Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -196,6 +196,11 @@ def generate_audio_elevenlabs(text):
|
|
196 |
def chat_with_bot(messages, user_message):
|
197 |
# Add user message to the chat history
|
198 |
messages.append((user_message, ""))
|
|
|
|
|
|
|
|
|
|
|
199 |
response = get_response(user_message)
|
200 |
|
201 |
# Simulate streaming response by iterating over each character in the response
|
|
|
196 |
def chat_with_bot(messages, user_message):
|
197 |
# Add user message to the chat history
|
198 |
messages.append((user_message, ""))
|
199 |
+
|
200 |
+
# Clear the input box immediately
|
201 |
+
yield messages, ""
|
202 |
+
|
203 |
+
# Generate the response in a streaming manner
|
204 |
response = get_response(user_message)
|
205 |
|
206 |
# Simulate streaming response by iterating over each character in the response
|