Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -115,14 +115,15 @@ def launch_bot():
|
|
115 |
# st.session_state.messages.append({"role": "user", "content": "Convert to Audio 🔊"})
|
116 |
# with st.chat_message("user"):
|
117 |
# st.write("Convert to Audio 🔊")
|
118 |
-
with st.popover("Open Audio"):
|
119 |
-
sound_file = BytesIO()
|
120 |
-
tts = gTTS(response, lang='en')
|
121 |
-
tts.write_to_fp(sound_file)
|
122 |
-
|
123 |
-
st.audio(sound_file)
|
124 |
|
125 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
126 |
|
127 |
|
128 |
|
|
|
115 |
# st.session_state.messages.append({"role": "user", "content": "Convert to Audio 🔊"})
|
116 |
# with st.chat_message("user"):
|
117 |
# st.write("Convert to Audio 🔊")
|
118 |
+
#with st.popover("Open Audio"):
|
|
|
|
|
|
|
|
|
|
|
119 |
|
120 |
+
sound_file = BytesIO()
|
121 |
+
tts = gTTS(response, lang='en')
|
122 |
+
tts.write_to_fp(sound_file)
|
123 |
+
|
124 |
+
st.audio(sound_file)
|
125 |
+
|
126 |
+
st.session_state.messages.append(st.audio(sound_file))
|
127 |
|
128 |
|
129 |
|