Tanxshh commited on
Commit
6a7a011
·
verified ·
1 Parent(s): 87710dc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -16,7 +16,8 @@ def analyze_pdfs_gradio(files):
16
  iface = gr.Interface(
17
  fn=analyze_pdfs_gradio,
18
  inputs=gr.File(
19
- type="file",
 
20
  file_count="multiple",
21
  label="Upload PDF(s)"
22
  ),
@@ -26,5 +27,5 @@ iface = gr.Interface(
26
  )
27
 
28
  if __name__ == "__main__":
29
- iface.queue() # enables /api/predict endpoint for POST requests
30
  iface.launch(server_name="0.0.0.0", server_port=7860)
 
16
  iface = gr.Interface(
17
  fn=analyze_pdfs_gradio,
18
  inputs=gr.File(
19
+ type="filepath", # <-- must be 'filepath' to work with your pipeline
20
+ file_types=[".pdf"],
21
  file_count="multiple",
22
  label="Upload PDF(s)"
23
  ),
 
27
  )
28
 
29
  if __name__ == "__main__":
30
+ iface.queue() # enables /api/predict endpoint for API calls
31
  iface.launch(server_name="0.0.0.0", server_port=7860)