MEOW commited on
Commit
907a3b1
·
unverified ·
1 Parent(s): 8b41010

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -134,11 +134,11 @@ with gr.Blocks() as demo:
134
  description=("Upload **at least** one document, optional to input HTML URL before Q&A")
135
 
136
  with gr.Row():
137
- input=[
138
- gr.File(label="Select files to upload", file_count="multiple"),
139
- gr.Textbox(label="🔗 Paste a URL (optional)",placeholder="Enter a HTML URL here")
140
- ]
141
- load_btn = gr.Button("Upload input (PDF,CSV,Docx,Pptx,JPG,PNG,website)")
142
 
143
  load_output = gr.Textbox(label="Load Status")
144
 
@@ -147,7 +147,7 @@ with gr.Blocks() as demo:
147
  clear = gr.Button("Clear")
148
 
149
  # Set up event handler (Event handlers should be defined within the 'with gr.Blocks() as demo:' block)
150
- load_btn.click(load_documents, inputs=[file_input], outputs=[load_output])
151
  msg.submit(stream_response, inputs=[msg, chatbot], outputs=[chatbot]) # Use submit button instead of msg
152
  clear.click(lambda: None, None, chatbot, queue=False)
153
 
 
134
  description=("Upload **at least** one document, optional to input HTML URL before Q&A")
135
 
136
  with gr.Row():
137
+ file_input = [
138
+ gr.File(label="Select files to upload", file_count="multiple"),
139
+ gr.Textbox(label="🔗 Paste a URL (optional)",placeholder="Enter a HTML URL here")
140
+ ]
141
+ load_btn = gr.Button("Upload input (PDF,CSV,Docx,Pptx,JPG,PNG,website)")
142
 
143
  load_output = gr.Textbox(label="Load Status")
144
 
 
147
  clear = gr.Button("Clear")
148
 
149
  # Set up event handler (Event handlers should be defined within the 'with gr.Blocks() as demo:' block)
150
+ load_btn.click(load_documents, inputs=[gr.File,gr.Textbook], outputs=[load_output])
151
  msg.submit(stream_response, inputs=[msg, chatbot], outputs=[chatbot]) # Use submit button instead of msg
152
  clear.click(lambda: None, None, chatbot, queue=False)
153