vishwask commited on
Commit
a71f890
·
1 Parent(s): 64c27bc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -311,7 +311,11 @@ if prompt := st.chat_input("How can I help you today?"):
311
 
312
  if st.session_state.clicked:
313
  # The message and nested widget will remain on the page
314
- generate_audio()
 
 
 
 
315
 
316
  st.session_state.messages.append({"role": "assistant", "content": full_response})
317
 
 
311
 
312
  if st.session_state.clicked:
313
  # The message and nested widget will remain on the page
314
+ #generate_audio()
315
+ sound_file = BytesIO()
316
+ tts = gTTS(result['result'], lang='en')
317
+ tts.write_to_fp(sound_file)
318
+ st.audio(sound_file)
319
 
320
  st.session_state.messages.append({"role": "assistant", "content": full_response})
321