Taocan commited on
Commit
723f60f
·
1 Parent(s): fe3bb6d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -109,7 +109,7 @@ conv = Conversation(prompt, 10)
109
  # with gr.Blocks(css="#chatbot{height:800px} .overflow-y-auto{height:500px}") as demo:
110
  # chatbot = gr.Chatbot([], elem_id="chatbot").style(height=750)
111
  with gr.Blocks(css="#chatty{height:800px} .overflow-y-auto{height:500px}") as demo:
112
- chatty = gr.Chatbot([], name="Chatty", elem_id="chatty").style(height=800, width=800)
113
 
114
  with gr.Row():
115
  with gr.Column(scale=0.85):
@@ -120,11 +120,11 @@ with gr.Blocks(css="#chatty{height:800px} .overflow-y-auto{height:500px}") as de
120
  with gr.Column(scale=0.15, min_width=0):
121
  btn = gr.UploadButton("📁", file_types=["image", "video", "audio"])
122
 
123
- txt_msg = txt.submit(add_text, [chatbot, txt], [chatbot, txt], queue=False).then(
124
  bot, chatty, chatty
125
  )
126
  txt_msg.then(lambda: gr.update(interactive=True), None, [txt], queue=False)
127
- file_msg = btn.upload(add_file, [chatbot, btn], [chatbot], queue=False).then(
128
  bot, chatty, chatty
129
  )
130
  demo.launch()
 
109
  # with gr.Blocks(css="#chatbot{height:800px} .overflow-y-auto{height:500px}") as demo:
110
  # chatbot = gr.Chatbot([], elem_id="chatbot").style(height=750)
111
  with gr.Blocks(css="#chatty{height:800px} .overflow-y-auto{height:500px}") as demo:
112
+ chatty = gr.Chatbot([], name="Chatty", elem_id="chatbot").style(height=800, width=800)
113
 
114
  with gr.Row():
115
  with gr.Column(scale=0.85):
 
120
  with gr.Column(scale=0.15, min_width=0):
121
  btn = gr.UploadButton("📁", file_types=["image", "video", "audio"])
122
 
123
+ txt_msg = txt.submit(add_text, [chatty, txt], [chatty, txt], queue=False).then(
124
  bot, chatty, chatty
125
  )
126
  txt_msg.then(lambda: gr.update(interactive=True), None, [txt], queue=False)
127
+ file_msg = btn.upload(add_file, [chatty, btn], [chatty], queue=False).then(
128
  bot, chatty, chatty
129
  )
130
  demo.launch()