Solshine commited on
Commit
8ea553d
1 Parent(s): e1c809c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -106,10 +106,11 @@ def launch_bot():
106
  st.session_state.messages.append(message)
107
 
108
  # If assistant has most recently reaponded create audio of response
109
- if st.session_state.messages[-1]["role"] == "assistant" or st.session_state_messafes[-1]["role"] == "content":
110
  audio_result = st.button("Convert to Audio 🔊")
111
  if audio_result:
112
- with st.chat_message("text-to-speech"):
 
113
  #text-to-speech
114
  print("Calling in Text-to-speech via suno/bark-small")
115
 
 
106
  st.session_state.messages.append(message)
107
 
108
  # If assistant has most recently reaponded create audio of response
109
+ if st.session_state.messages[-1]["role"] == "assistant":
110
  audio_result = st.button("Convert to Audio 🔊")
111
  if audio_result:
112
+ st.session_state.messages.append({"role": "assistant", "content": prompt})
113
+ with st.chat_message("text-to-speech (may take a few minutes"):
114
  #text-to-speech
115
  print("Calling in Text-to-speech via suno/bark-small")
116