Spaces:
Running
Running
Clement Vachet
commited on
Commit
·
30d36b3
1
Parent(s):
7e507f5
Fix expected file type for gradio button
Browse files
app.py
CHANGED
@@ -296,7 +296,7 @@ def demo():
|
|
296 |
|
297 |
with gr.Tab("Step 1 - Upload PDF"):
|
298 |
with gr.Row():
|
299 |
-
document = gr.
|
300 |
# upload_btn = gr.UploadButton("Loading document...", height=100, file_count="multiple", file_types=["pdf"], scale=1)
|
301 |
|
302 |
with gr.Tab("Step 2 - Process document"):
|
@@ -344,7 +344,7 @@ def demo():
|
|
344 |
msg = gr.Textbox(placeholder="Type message (e.g. 'What is this document about?')", container=True)
|
345 |
with gr.Row():
|
346 |
submit_btn = gr.Button("Submit message")
|
347 |
-
clear_btn = gr.ClearButton([msg, chatbot], value="Clear conversation")
|
348 |
|
349 |
# Preprocessing events
|
350 |
#upload_btn.upload(upload_file, inputs=[upload_btn], outputs=[document])
|
|
|
296 |
|
297 |
with gr.Tab("Step 1 - Upload PDF"):
|
298 |
with gr.Row():
|
299 |
+
document = gr.File(height=200, file_count="multiple", file_types=[".pdf"], interactive=True, label="Upload your PDF documents (single or multiple)")
|
300 |
# upload_btn = gr.UploadButton("Loading document...", height=100, file_count="multiple", file_types=["pdf"], scale=1)
|
301 |
|
302 |
with gr.Tab("Step 2 - Process document"):
|
|
|
344 |
msg = gr.Textbox(placeholder="Type message (e.g. 'What is this document about?')", container=True)
|
345 |
with gr.Row():
|
346 |
submit_btn = gr.Button("Submit message")
|
347 |
+
clear_btn = gr.ClearButton(components=[msg, chatbot], value="Clear conversation")
|
348 |
|
349 |
# Preprocessing events
|
350 |
#upload_btn.upload(upload_file, inputs=[upload_btn], outputs=[document])
|