Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -96,8 +96,6 @@ with gr.Blocks() as demo:
|
|
96 |
message = tokenizer.apply_chat_template(chat_data, tokenize=False)
|
97 |
message = message[3:] # remove SOT token
|
98 |
|
99 |
-
print(message)
|
100 |
-
|
101 |
data = {
|
102 |
"model": MODEL_NAME,
|
103 |
"prompt": str(message),
|
@@ -115,6 +113,7 @@ with gr.Blocks() as demo:
|
|
115 |
|
116 |
with requests.post(API_URL, headers=HEADERS, data=json.dumps(data), stream=True) as r:
|
117 |
for response in r.iter_lines():
|
|
|
118 |
if len(response) > 0:
|
119 |
text = response.decode()
|
120 |
if text != "data: [DONE]":
|
|
|
96 |
message = tokenizer.apply_chat_template(chat_data, tokenize=False)
|
97 |
message = message[3:] # remove SOT token
|
98 |
|
|
|
|
|
99 |
data = {
|
100 |
"model": MODEL_NAME,
|
101 |
"prompt": str(message),
|
|
|
113 |
|
114 |
with requests.post(API_URL, headers=HEADERS, data=json.dumps(data), stream=True) as r:
|
115 |
for response in r.iter_lines():
|
116 |
+
print(response)
|
117 |
if len(response) > 0:
|
118 |
text = response.decode()
|
119 |
if text != "data: [DONE]":
|