zliang commited on
Commit
c5d6690
1 Parent(s): 67810b1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -2
app.py CHANGED
@@ -69,12 +69,17 @@ def process_pdf(pdf_file):
69
  return all_figures, all_tables
70
 
71
  # Create Gradio interface
 
72
  iface = gr.Interface(
73
  fn=process_pdf,
74
  inputs=gr.File(label="Upload a PDF"),
75
  outputs=[
76
- gr.Gallery(label="Figures from PDF",object_fit='scale-down'),
77
- gr.Gallery(label="Tables from PDF ",object_fit='scale-down')
 
 
 
 
78
  ],
79
  title="PDF figures and tables extraction based on YOLOv10",
80
  description="Upload a PDF file to get figures and tables in the PDF"
 
69
  return all_figures, all_tables
70
 
71
  # Create Gradio interface
72
+
73
  iface = gr.Interface(
74
  fn=process_pdf,
75
  inputs=gr.File(label="Upload a PDF"),
76
  outputs=[
77
+ gr.Row(
78
+ [
79
+ gr.Gallery(label="Figures from PDF", object_fit='scale-down'),
80
+ gr.Gallery(label="Tables from PDF", object_fit='scale-down')
81
+ ]
82
+ )
83
  ],
84
  title="PDF figures and tables extraction based on YOLOv10",
85
  description="Upload a PDF file to get figures and tables in the PDF"