Update app.py
Browse files
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"
|
110 |
audio_result = st.button("Convert to Audio 🔊")
|
111 |
if audio_result:
|
112 |
-
|
|
|
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 |
|