Taocan commited on
Commit
8fbe34b
·
1 Parent(s): a796566

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -16
app.py CHANGED
@@ -118,21 +118,11 @@ with gr.Blocks(css="#chatbot{height:300px} .overflow-y-auto{height:500px}") as d
118
  with gr.Column(scale=0.15, min_width=0):
119
  btn = gr.UploadButton("📁", file_types=["image", "video", "audio"])
120
 
121
- # txt_msg = txt.submit(add_text, [chatbot, txt], [chatbot, txt], queue=False).then(
122
- # bot, chatbot, chatbot
123
- # )
124
- # txt_msg.then(lambda: gr.update(interactive=True), None, [txt], queue=False)
125
- # file_msg = btn.upload(add_file, [chatbot, btn], [chatbot], queue=False).then(
126
- # bot, chatbot, chatbot
127
- # )
128
- txt_msg = txt.submit(on_text_submit, [chatbot, txt], [chatbot, txt]).then(
129
- None,
130
- None,
131
- [chatbot]
132
  )
133
- file_msg = btn.upload(on_file_upload, [chatbot, btn], [chatbot]).then(
134
- on_file_upload,
135
- None,
136
- [chatbot, btn]
137
- )
138
  demo.launch()
 
118
  with gr.Column(scale=0.15, min_width=0):
119
  btn = gr.UploadButton("📁", file_types=["image", "video", "audio"])
120
 
121
+ txt_msg = txt.submit(add_text, [chatbot, txt], [chatbot, txt], queue=False).then(
122
+ bot, chatbot, chatbot
123
+ )
124
+ txt_msg.then(lambda: gr.update(interactive=True), None, [txt], queue=False)
125
+ file_msg = btn.upload(add_file, [chatbot, btn], [chatbot], queue=False).then(
126
+ bot, chatbot, chatbot
 
 
 
 
 
127
  )
 
 
 
 
 
128
  demo.launch()