Update app.py
Browse files
app.py
CHANGED
|
@@ -44,7 +44,8 @@ with gr.Blocks() as demo:
|
|
| 44 |
gr.Markdown("# Upload a PDF or an image of a table")
|
| 45 |
|
| 46 |
with gr.Row():
|
| 47 |
-
|
|
|
|
| 48 |
page_input = gr.Number(label="Page number for PDF (ignore if uploading an image)", value=1, precision=0)
|
| 49 |
|
| 50 |
output = gr.Textbox(label="Result")
|
|
|
|
| 44 |
gr.Markdown("# Upload a PDF or an image of a table")
|
| 45 |
|
| 46 |
with gr.Row():
|
| 47 |
+
# Specify file types explicitly: PDFs and images (jpg, png)
|
| 48 |
+
file_input = gr.File(label="Upload PDF or Image", file_types=["pdf", "image"])
|
| 49 |
page_input = gr.Number(label="Page number for PDF (ignore if uploading an image)", value=1, precision=0)
|
| 50 |
|
| 51 |
output = gr.Textbox(label="Result")
|