manu commited on
Commit
41ea330
·
verified ·
1 Parent(s): 7e7bfe7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -3
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 Datset", 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,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