Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -51,7 +51,7 @@ def bot(chat_msg, history=None, audio_response=False):
|
|
51 |
bot_message = completion.choices[0].message.content
|
52 |
if audio_response:
|
53 |
response_audio = audio_response(bot_message, voice="Sophia")
|
54 |
-
|
55 |
print("2. Messages:\n")
|
56 |
print(messages)
|
57 |
return "", messages, ""
|
|
|
51 |
bot_message = completion.choices[0].message.content
|
52 |
if audio_response:
|
53 |
response_audio = audio_response(bot_message, voice="Sophia")
|
54 |
+
messages.append({"role": "assistant", "content": (gr.Audio(response_audio) if "Ein Fehler mit der GET_AUDIO_API" not in response_audio else bot_message)})
|
55 |
print("2. Messages:\n")
|
56 |
print(messages)
|
57 |
return "", messages, ""
|