nicholasKluge commited on
Commit
d6f0dcf
1 Parent(s): c571372

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -53,7 +53,7 @@ with gr.Blocks(theme='freddyaboulton/dracula_revamped') as demo:
53
 
54
  msg = gr.Textbox(label="Write a question or comment to Aira ...", placeholder="Hi Aira, how are you?")
55
 
56
- clear = gr.ClearButton([msg, chatbot])
57
  gr.Markdown(disclaimer)
58
 
59
  def user(user_message, chat_history):
@@ -88,6 +88,7 @@ with gr.Blocks(theme='freddyaboulton/dracula_revamped') as demo:
88
  )
89
  response.then(lambda: gr.update(interactive=True), None, [msg], queue=False)
90
  msg.submit(lambda x: gr.update(value=''), [],[msg])
 
91
 
92
  demo.queue()
93
  demo.launch()
 
53
 
54
  msg = gr.Textbox(label="Write a question or comment to Aira ...", placeholder="Hi Aira, how are you?")
55
 
56
+ clear = gr.Button("Clear Conversation 🧹")
57
  gr.Markdown(disclaimer)
58
 
59
  def user(user_message, chat_history):
 
88
  )
89
  response.then(lambda: gr.update(interactive=True), None, [msg], queue=False)
90
  msg.submit(lambda x: gr.update(value=''), [],[msg])
91
+ clear.click(lambda: None, None, chatbot, queue=False)
92
 
93
  demo.queue()
94
  demo.launch()