Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -59,8 +59,8 @@ def bot(chat_msg, history=None, audio_tts_checkbox=False):
|
|
59 |
response_audio = audio_response(bot_message, voice="Sophia")
|
60 |
print("response_audio:")
|
61 |
print(response_audio)
|
62 |
-
messages.append({"role": "assistant", "content": (gr.Audio(response_audio.encode()) if "Ein Fehler mit der GET_AUDIO_API" not in response_audio else bot_message)})
|
63 |
-
|
64 |
print("2. Messages:\n")
|
65 |
print(messages)
|
66 |
return "", messages, ""
|
|
|
59 |
response_audio = audio_response(bot_message, voice="Sophia")
|
60 |
print("response_audio:")
|
61 |
print(response_audio)
|
62 |
+
# messages.append({"role": "assistant", "content": (gr.Audio(response_audio.encode()) if "Ein Fehler mit der GET_AUDIO_API" not in response_audio else bot_message)})
|
63 |
+
messages.append({"role": "assistant", "content": (gr.Audio(response_audio) if isinstance(response_audio, bytes) else bot_message)})
|
64 |
print("2. Messages:\n")
|
65 |
print(messages)
|
66 |
return "", messages, ""
|