Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -103,14 +103,15 @@ def clear_chat():
|
|
103 |
return None
|
104 |
|
105 |
with gr.Blocks(fill_width=True, fill_height=True) as demo:
|
106 |
-
gr.ChatInterface(
|
107 |
fn=generate_response,
|
108 |
chatbot=gr.Chatbot(show_label=False, show_share_button=False, show_copy_button=True, likeable=True, layout="panel"),
|
109 |
additional_inputs=additional_inputs,
|
110 |
examples=example1,
|
111 |
cache_examples=False,
|
112 |
-
)
|
113 |
-
|
114 |
-
clear_button.
|
|
|
115 |
|
116 |
demo.launch()
|
|
|
103 |
return None
|
104 |
|
105 |
with gr.Blocks(fill_width=True, fill_height=True) as demo:
|
106 |
+
ci= gr.ChatInterface(
|
107 |
fn=generate_response,
|
108 |
chatbot=gr.Chatbot(show_label=False, show_share_button=False, show_copy_button=True, likeable=True, layout="panel"),
|
109 |
additional_inputs=additional_inputs,
|
110 |
examples=example1,
|
111 |
cache_examples=False,
|
112 |
+
)
|
113 |
+
ci.clear_btn.click(clear_chat)
|
114 |
+
# clear_button = gr.Button("Clear chat history and Start a new chat")
|
115 |
+
# clear_button.click(clear_chat, inputs=None, outputs=None)
|
116 |
|
117 |
demo.launch()
|