Pijush2023 commited on
Commit
dab84f9
·
verified ·
1 Parent(s): edfcec0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -0
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