Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -3,6 +3,7 @@ import base64
|
|
| 3 |
from io import BytesIO
|
| 4 |
|
| 5 |
import gradio as gr
|
|
|
|
| 6 |
import torch
|
| 7 |
|
| 8 |
from pdf2image import convert_from_path
|
|
@@ -160,7 +161,8 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
|
| 160 |
with gr.Row():
|
| 161 |
with gr.Column(scale=2):
|
| 162 |
gr.Markdown("## 1️⃣ Upload PDFs")
|
| 163 |
-
file = gr.File(file_types=["pdf"], file_count="multiple", label="Upload PDFs")
|
|
|
|
| 164 |
|
| 165 |
convert_button = gr.Button("🔄 Index documents")
|
| 166 |
message = gr.Textbox("Files not yet uploaded", label="Status")
|
|
|
|
| 3 |
from io import BytesIO
|
| 4 |
|
| 5 |
import gradio as gr
|
| 6 |
+
from gradio_pdf import PDF
|
| 7 |
import torch
|
| 8 |
|
| 9 |
from pdf2image import convert_from_path
|
|
|
|
| 161 |
with gr.Row():
|
| 162 |
with gr.Column(scale=2):
|
| 163 |
gr.Markdown("## 1️⃣ Upload PDFs")
|
| 164 |
+
# file = gr.File(file_types=["pdf"], file_count="multiple", label="Upload PDFs")
|
| 165 |
+
file = PDF(label="PDF Document")
|
| 166 |
|
| 167 |
convert_button = gr.Button("🔄 Index documents")
|
| 168 |
message = gr.Textbox("Files not yet uploaded", label="Status")
|