Spaces:
Running on Zero
Running on Zero
Disable api_name to avoid bool TypeError in Gradio 4
Browse files
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()
|