alexkueck commited on
Commit
e0b15e8
·
1 Parent(s): f434731

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -114,7 +114,7 @@ print ("Tokenizer")
114
  ################################################
115
  def add_text(history, text):
116
  history = history + [(text, None)]
117
- return history, gr.Textbox(value="", interactive=False)
118
 
119
 
120
  def add_file(history, file):
@@ -489,9 +489,9 @@ with gr.Blocks(css=customCSS, theme=small_and_beautiful_theme) as demo:
489
  # Chatbot
490
  transfer_input_args = dict(fn=add_text, inputs=[chatbot, user_input], outputs=[chatbot, user_input], show_progress=True)
491
 
492
- predict_event1 = user_input.submit(fn=add_text, inputs=[chatbot, user_input], outputs=[chatbot, user_input], queue=False,).then(**predict_args)
493
- predict_event3 = btn.upload(add_file, [chatbot, btn, user_input], [chatbot, user_input],queue=False,).then(**predict_args)
494
- predict_event2 = submitBtn.click(fn=add_text, inputs=[chatbot, user_input], outputs=[chatbot, user_input], queue=False,).then(**predict_args)
495
 
496
  cancelBtn.click(
497
  cancel_outputing, [], [status_display],
 
114
  ################################################
115
  def add_text(history, text):
116
  history = history + [(text, None)]
117
+ return history #, gr.Textbox(value="", interactive=False)
118
 
119
 
120
  def add_file(history, file):
 
489
  # Chatbot
490
  transfer_input_args = dict(fn=add_text, inputs=[chatbot, user_input], outputs=[chatbot, user_input], show_progress=True)
491
 
492
+ predict_event1 = user_input.submit(fn=add_text, inputs=[chatbot, user_input], outputs=[chatbot], queue=False,).then(**predict_args)
493
+ predict_event3 = btn.upload(add_file, [chatbot, btn, user_input], [chatbot],queue=False,).then(**predict_args)
494
+ predict_event2 = submitBtn.click(fn=add_text, inputs=[chatbot, user_input], outputs=[chatbot], queue=False,).then(**predict_args)
495
 
496
  cancelBtn.click(
497
  cancel_outputing, [], [status_display],