Spaces:
Runtime error
Runtime error
AchyuthGamer
commited on
Commit
โข
d955865
1
Parent(s):
a5a7a91
Update app.py
Browse files
app.py
CHANGED
@@ -5,7 +5,7 @@ from gtts import gTTS
|
|
5 |
import os
|
6 |
|
7 |
# Constants
|
8 |
-
TITLE = "๐๐น๐ฎ๐๐น๐ฒ๐๐๐๐
|
9 |
DESCRIPTION = """
|
10 |
----
|
11 |
าสแดแดกสแดssแดษช | แดสแดแดษขแดแด's ษดษชษขสแดแดแดสแด ๐
|
@@ -85,7 +85,7 @@ if wav_audio_data is not None:
|
|
85 |
# transcribe audio
|
86 |
response = predict(message=prompt)
|
87 |
|
88 |
-
with st.chat_message("assistant", avatar='
|
89 |
st.markdown(response)
|
90 |
|
91 |
# Convert AI response to speech
|
@@ -100,7 +100,7 @@ if wav_audio_data is not None:
|
|
100 |
# React to user input
|
101 |
if prompt := textinput:
|
102 |
# Display user message in chat message container
|
103 |
-
st.chat_message("human", avatar="
|
104 |
# Add user message to chat history
|
105 |
st.session_state.messages.append({"role": "human", "content": prompt})
|
106 |
|
@@ -110,7 +110,7 @@ if prompt := textinput:
|
|
110 |
speech_file = text_to_speech(response)
|
111 |
|
112 |
# Display assistant response in chat message container
|
113 |
-
with st.chat_message("assistant", avatar='
|
114 |
st.markdown(response)
|
115 |
|
116 |
# Play the generated speech
|
|
|
5 |
import os
|
6 |
|
7 |
# Constants
|
8 |
+
TITLE = "๐๐น๐ฎ๐๐น๐ฒ๐๐๐๐ ๐ฅ"
|
9 |
DESCRIPTION = """
|
10 |
----
|
11 |
าสแดแดกสแดssแดษช | แดสแดแดษขแดแด's ษดษชษขสแดแดแดสแด ๐
|
|
|
85 |
# transcribe audio
|
86 |
response = predict(message=prompt)
|
87 |
|
88 |
+
with st.chat_message("assistant", avatar='๐ฅ'):
|
89 |
st.markdown(response)
|
90 |
|
91 |
# Convert AI response to speech
|
|
|
100 |
# React to user input
|
101 |
if prompt := textinput:
|
102 |
# Display user message in chat message container
|
103 |
+
st.chat_message("human", avatar="๐ฅ").markdown(prompt)
|
104 |
# Add user message to chat history
|
105 |
st.session_state.messages.append({"role": "human", "content": prompt})
|
106 |
|
|
|
110 |
speech_file = text_to_speech(response)
|
111 |
|
112 |
# Display assistant response in chat message container
|
113 |
+
with st.chat_message("assistant", avatar='๐ฅ'):
|
114 |
st.markdown(response)
|
115 |
|
116 |
# Play the generated speech
|