Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -167,8 +167,8 @@ def chatbot_conversation(audio_file_path, history):
|
|
167 |
response_format={"type": "text"}
|
168 |
):
|
169 |
token = message.choices[0].delta.content
|
170 |
-
|
171 |
-
|
172 |
print(token, end="")
|
173 |
response += token
|
174 |
# Yield partial text updates, no audio yet, history unchanged yet
|
|
|
167 |
response_format={"type": "text"}
|
168 |
):
|
169 |
token = message.choices[0].delta.content
|
170 |
+
if token:
|
171 |
+
token = token.replace("<|im_start|>", "").replace("<|im_end|>", "")
|
172 |
print(token, end="")
|
173 |
response += token
|
174 |
# Yield partial text updates, no audio yet, history unchanged yet
|