Spaces:
Sleeping
Sleeping
N.Achyuth Reddy
commited on
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
|