Spaces:
Runtime error
Runtime error
Commit
·
850fa76
1
Parent(s):
78fe79a
Update app.py
Browse files
app.py
CHANGED
@@ -29,8 +29,8 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
|
29 |
chatbot = gr.Chatbot()
|
30 |
msg = gr.Textbox()
|
31 |
btn = gr.Button("Submit",variant="primary")
|
32 |
-
gr.ClearButton(msg, chatbot)
|
33 |
-
|
34 |
|
35 |
|
36 |
def user(user_message, history):
|
@@ -56,7 +56,7 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
|
56 |
bot, chatbot, chatbot
|
57 |
)
|
58 |
response.then(lambda: gr.update(interactive=True), None, [msg], queue=False)
|
59 |
-
|
60 |
|
61 |
demo.queue()
|
62 |
demo.launch()
|
|
|
29 |
chatbot = gr.Chatbot()
|
30 |
msg = gr.Textbox()
|
31 |
btn = gr.Button("Submit",variant="primary")
|
32 |
+
# gr.ClearButton([msg, chatbot])
|
33 |
+
clear = gr.Button("Clear")
|
34 |
|
35 |
|
36 |
def user(user_message, history):
|
|
|
56 |
bot, chatbot, chatbot
|
57 |
)
|
58 |
response.then(lambda: gr.update(interactive=True), None, [msg], queue=False)
|
59 |
+
clear.click(lambda: None, None, chatbot, queue=False)
|
60 |
|
61 |
demo.queue()
|
62 |
demo.launch()
|