Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -85,8 +85,8 @@ def respond(
|
|
85 |
messages.append({"role": "assistant", "content": val[1]})
|
86 |
|
87 |
messages.append({"role": "user", "content": message})
|
88 |
-
|
89 |
-
|
90 |
messages,
|
91 |
add_generation_prompt=True,
|
92 |
return_tensors="pt"
|
@@ -113,9 +113,8 @@ def respond(
|
|
113 |
for text in streamer:
|
114 |
outputs.append(text)
|
115 |
#print(outputs)
|
116 |
-
yield "".join(outputs)
|
117 |
|
118 |
-
"""
|
119 |
response = ""
|
120 |
|
121 |
for message in client.chat_completion(
|
|
|
85 |
messages.append({"role": "assistant", "content": val[1]})
|
86 |
|
87 |
messages.append({"role": "user", "content": message})
|
88 |
+
|
89 |
+
"""input_ids = tokenizer.apply_chat_template(
|
90 |
messages,
|
91 |
add_generation_prompt=True,
|
92 |
return_tensors="pt"
|
|
|
113 |
for text in streamer:
|
114 |
outputs.append(text)
|
115 |
#print(outputs)
|
116 |
+
yield "".join(outputs)"""
|
117 |
|
|
|
118 |
response = ""
|
119 |
|
120 |
for message in client.chat_completion(
|