Mer1Alii commited on
Commit
55fa371
·
verified ·
1 Parent(s): c2755e9

Disable api_name to avoid bool TypeError in Gradio 4

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -265,8 +265,8 @@ with gr.Blocks(theme=gr.themes.Soft(primary_hue="red")) as demo:
265
  chat_history[-1] = (user_message, bot_message)
266
  yield chat_history, ""
267
 
268
- submit_btn.click(respond, [msg, chatbot], [chatbot, msg])
269
- msg.submit(respond, [msg, chatbot], [chatbot, msg])
270
 
271
  if __name__ == "__main__":
272
  demo.launch()
 
265
  chat_history[-1] = (user_message, bot_message)
266
  yield chat_history, ""
267
 
268
+ submit_btn.click(respond, [msg, chatbot], [chatbot, msg], api_name=False)
269
+ msg.submit(respond, [msg, chatbot], [chatbot, msg], api_name=False)
270
 
271
  if __name__ == "__main__":
272
  demo.launch()