osaaso commited on
Commit
89057f0
·
1 Parent(s): 092676c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -15
app.py CHANGED
@@ -185,21 +185,20 @@ with gr.Blocks() as demo:
185
  avatar_images=(None, (os.path.join(os.path.dirname(__file__), "avatar.png"))),
186
  )
187
  with gr.Row():
188
- txt = gr.Textbox(
189
- scale=4,
190
- show_label=False,
191
- placeholder="Enter text and press enter, or upload an image",
192
- container=False,
193
- )
194
- btn = gr.UploadButton("📁", file_types=["image", "video", "audio"])
195
-
196
- txt_msg = txt.submit(add_text, [chatbot, txt], [chatbot, txt], queue=False).then(
197
- bot, chatbot, chatbot, api_name="bot_response"
198
- )
199
- txt_msg.then(lambda: gr.Textbox(interactive=True), None, [txt], queue=False)
200
- file_msg = btn.upload(add_file, [chatbot, btn], [chatbot], queue=False).then(
201
- bot, chatbot, chatbot
202
- )
203
  with gr.Row():
204
  with gr.Column():
205
  data = gr.Dataframe() #styler)
 
185
  avatar_images=(None, (os.path.join(os.path.dirname(__file__), "avatar.png"))),
186
  )
187
  with gr.Row():
188
+ txt = gr.Textbox(
189
+ scale=4,
190
+ show_label=False,
191
+ placeholder="Enter text and press enter, or upload an image",
192
+ container=False,
193
+ )
194
+ btn = gr.UploadButton("📁", file_types=["image", "video", "audio"])
195
+ txt_msg = txt.submit(add_text, [chatbot, txt], [chatbot, txt], queue=False).then(
196
+ bot, chatbot, chatbot, api_name="bot_response"
197
+ )
198
+ txt_msg.then(lambda: gr.Textbox(interactive=True), None, [txt], queue=False)
199
+ file_msg = btn.upload(add_file, [chatbot, btn], [chatbot], queue=False).then(
200
+ bot, chatbot, chatbot
201
+ )
 
202
  with gr.Row():
203
  with gr.Column():
204
  data = gr.Dataframe() #styler)