Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -603,7 +603,7 @@ def build_ui():
|
|
603 |
placeholder="manu/test-dataset",
|
604 |
value="",
|
605 |
)
|
606 |
-
index_url_btn = gr.Button("🌐 Load From HF
|
607 |
status_box = gr.Textbox(label="Status", interactive=False)
|
608 |
with gr.Column(scale=2):
|
609 |
pdf_view = PDF(label="PDF Preview")
|
@@ -620,8 +620,6 @@ def build_ui():
|
|
620 |
|
621 |
def handle_url(url: str):
|
622 |
global current_pdf_path
|
623 |
-
if not url or not url.lower().endswith(".pdf"):
|
624 |
-
return "Please provide a direct PDF URL ending in .pdf", None
|
625 |
status, path = index_from_url(url)
|
626 |
current_pdf_path = path
|
627 |
return status, path
|
|
|
603 |
placeholder="manu/test-dataset",
|
604 |
value="",
|
605 |
)
|
606 |
+
index_url_btn = gr.Button("🌐 Load From HF Dataset", variant="secondary")
|
607 |
status_box = gr.Textbox(label="Status", interactive=False)
|
608 |
with gr.Column(scale=2):
|
609 |
pdf_view = PDF(label="PDF Preview")
|
|
|
620 |
|
621 |
def handle_url(url: str):
|
622 |
global current_pdf_path
|
|
|
|
|
623 |
status, path = index_from_url(url)
|
624 |
current_pdf_path = path
|
625 |
return status, path
|