VanYsa commited on
Commit
3205cb6
·
1 Parent(s): 05aa177

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -119,7 +119,7 @@ def add_message(history, message):
119
  Returns the updated chatbot with an empty input textbox.
120
  """
121
  history.append((message, None))
122
- return history, gr.Textbox(value="", interactive=False)
123
 
124
  def bot(history,message):
125
  """
@@ -218,7 +218,7 @@ with gr.Blocks(
218
  components=[chatbot],
219
  value="Clear chat",
220
  )
221
- chat_msg = chat_input.change(add_message, [chatbot, chat_input], [chatbot, chat_input])
222
  bot_msg = chat_msg.then(bot, [chatbot, chat_input], chatbot, api_name="bot_response")
223
  # bot_msg.then(lambda: gr.Textbox(interactive=False), None, [chat_input])
224
 
 
119
  Returns the updated chatbot with an empty input textbox.
120
  """
121
  history.append((message, None))
122
+ return history
123
 
124
  def bot(history,message):
125
  """
 
218
  components=[chatbot],
219
  value="Clear chat",
220
  )
221
+ chat_msg = chat_input.change(add_message, [chatbot, chat_input], [chatbot])
222
  bot_msg = chat_msg.then(bot, [chatbot, chat_input], chatbot, api_name="bot_response")
223
  # bot_msg.then(lambda: gr.Textbox(interactive=False), None, [chat_input])
224