AlexMia commited on
Commit
dcca7ef
1 Parent(s): 5235c72

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -51,9 +51,10 @@ def bot(chat_msg, history=None, audio_tts_checkbox=False):
51
  bot_message = completion.choices[0].message.content
52
 
53
  if audio_tts_checkbox==True:
 
54
  print("AUDIO TTS CHECKBOY IS TURE!")
55
  response_audio = audio_response(bot_message, voice="Sophia")
56
- messages.append({"role": "assistant", "content": (gr.Audio(response_audio) if "Ein Fehler mit der GET_AUDIO_API" not in response_audio else bot_message)})
57
 
58
  print("2. Messages:\n")
59
  print(messages)
 
51
  bot_message = completion.choices[0].message.content
52
 
53
  if audio_tts_checkbox==True:
54
+ if audio_tts_checkbox==True:
55
  print("AUDIO TTS CHECKBOY IS TURE!")
56
  response_audio = audio_response(bot_message, voice="Sophia")
57
+ 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)})
58
 
59
  print("2. Messages:\n")
60
  print(messages)