Solshine commited on
Commit
ead5a35
โ€ข
1 Parent(s): 8103164

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
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
- message = {"role": "assistant", "content": response}
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