Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -117,16 +117,15 @@ def launch_bot():
|
|
| 117 |
# st.session_state.messages.append({"role": "user", "content": "Convert to Audio π"})
|
| 118 |
# with st.chat_message("user"):
|
| 119 |
# st.write("Convert to Audio π")
|
| 120 |
-
text = " :blue[Convert to Audio] π "
|
| 121 |
|
| 122 |
with st.expander(text, expanded=False):
|
| 123 |
sound_file = BytesIO()
|
| 124 |
tts = gTTS(response, lang='en')
|
| 125 |
tts.write_to_fp(sound_file)
|
| 126 |
|
| 127 |
-
|
| 128 |
|
| 129 |
-
st.session_state.messages.append(st.audio(sound_file))
|
| 130 |
|
| 131 |
|
| 132 |
|
|
|
|
| 117 |
# st.session_state.messages.append({"role": "user", "content": "Convert to Audio π"})
|
| 118 |
# with st.chat_message("user"):
|
| 119 |
# st.write("Convert to Audio π")
|
| 120 |
+
text = " :blue[Convert to Audio ] π "
|
| 121 |
|
| 122 |
with st.expander(text, expanded=False):
|
| 123 |
sound_file = BytesIO()
|
| 124 |
tts = gTTS(response, lang='en')
|
| 125 |
tts.write_to_fp(sound_file)
|
| 126 |
|
| 127 |
+
st.audio(sound_file)
|
| 128 |
|
|
|
|
| 129 |
|
| 130 |
|
| 131 |
|