From 4058b33fc979716c7a74aeb5e5d830164f67ae42 Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Sun, 8 Jan 2023 01:10:02 -0300 Subject: [PATCH] Improve the chat experience --- server.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server.py b/server.py index b693ccb..f36f18c 100644 --- a/server.py +++ b/server.py @@ -197,7 +197,10 @@ elif args.chat: btn2 = gr.Button("Clear history") btn.click(chatbot, [textbox, temp_slider, length_slider, preset_menu, model_menu, name1, name2, context], display1, show_progress=True) + textbox.submit(chatbot, [textbox, temp_slider, length_slider, preset_menu, model_menu, name1, name2, context], display1, show_progress=True) btn2.click(clear) + btn.click(lambda x: "", textbox, textbox, show_progress=False) + btn2.click(lambda x: "", display1, display1) else: with gr.Blocks(css=".my-4 {margin-top: 0} .py-6 {padding-top: 2.5rem}") as interface: gr.Markdown(