Update app.py
Browse files
app.py
CHANGED
@@ -107,6 +107,9 @@ def launch_bot():
|
|
107 |
# else:
|
108 |
st.write(response)
|
109 |
|
|
|
|
|
|
|
110 |
audio_result = st.button("Convert to Audio ๐")
|
111 |
if audio_result:
|
112 |
# st.session_state.messages.append({"role": "user", "content": "Convert to Audio ๐"})
|
@@ -119,8 +122,7 @@ def launch_bot():
|
|
119 |
|
120 |
st.audio(sound_file)
|
121 |
|
122 |
-
|
123 |
-
st.session_state.messages.append(message)
|
124 |
|
125 |
|
126 |
|
|
|
107 |
# else:
|
108 |
st.write(response)
|
109 |
|
110 |
+
message = {"role": "assistant", "content": response}
|
111 |
+
st.session_state.messages.append(message)
|
112 |
+
|
113 |
audio_result = st.button("Convert to Audio ๐")
|
114 |
if audio_result:
|
115 |
# st.session_state.messages.append({"role": "user", "content": "Convert to Audio ๐"})
|
|
|
122 |
|
123 |
st.audio(sound_file)
|
124 |
|
125 |
+
st.session_state.messages.append(st.audio(sound_file))
|
|
|
126 |
|
127 |
|
128 |
|