mikeee commited on
Commit
8745ab1
·
1 Parent(s): 3bcce7c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -854,16 +854,19 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
854
  # interactive chat
855
  chatbot = gr.Chatbot()
856
  msg = gr.Textbox(label="Query")
857
- clear = gr.Button("Clear")
 
 
858
 
859
  # actions
860
  def reset_all():
861
  """Reset ns."""
862
  global ns
863
  ns = deepcopy(ns_initial)
 
864
  return f"reset done: ns={ns}"
865
 
866
- reset_btn.click(reset_all, [], text2)
867
 
868
  upload_button.upload(upload_files, upload_button, file_output)
869
  process_btn.click(process_files, [], text2)
 
854
  # interactive chat
855
  chatbot = gr.Chatbot()
856
  msg = gr.Textbox(label="Query")
857
+ with gr.Row():
858
+ submit_msg = gr.Button("Submit")
859
+ clear = gr.Button("Clear")
860
 
861
  # actions
862
  def reset_all():
863
  """Reset ns."""
864
  global ns
865
  ns = deepcopy(ns_initial)
866
+ logger.debug(f"reset {ns=}")
867
  return f"reset done: ns={ns}"
868
 
869
+ clear.click(reset_all, [], text2)
870
 
871
  upload_button.upload(upload_files, upload_button, file_output)
872
  process_btn.click(process_files, [], text2)