rodrigomasini commited on
Commit
b81e668
·
verified ·
1 Parent(s): 69b4885

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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
- 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
 
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