gvlktejaswi commited on
Commit
0592f9d
·
verified ·
1 Parent(s): 2fd4d80

Update page_files/Upload_Data.py

Browse files
Files changed (1) hide show
  1. page_files/Upload_Data.py +3 -3
page_files/Upload_Data.py CHANGED
@@ -119,7 +119,7 @@ def extract_images(pdf_path: str) -> list:
119
  try:
120
  with open(pdf_path, "rb") as f:
121
  pdf_bytes = f.read()
122
- plot_results, coverage = image2.extract_and_verify_plots(
123
  pdf_bytes, verify_engines=["gemini"]
124
  )
125
  # Drop captions naming photos/micrographs/logos and crops the verifier
@@ -656,13 +656,13 @@ def render_plots_tab(pdf_path: str, paper_id: str):
656
  d1, d2 = st.columns(2)
657
  d1.download_button(
658
  "⬇ Images + metadata (ZIP)",
659
- data=image2.create_plot_zip(plot_results, include_json=True),
660
  file_name=f"{paper_id}_plots.zip", mime="application/zip",
661
  use_container_width=True, key="dl_plots_zip",
662
  )
663
  d2.download_button(
664
  "⬇ Images only (ZIP)",
665
- data=image2.create_plot_zip(plot_results, include_json=False),
666
  file_name=f"{paper_id}_images.zip", mime="application/zip",
667
  use_container_width=True, key="dl_images_zip",
668
  )
 
119
  try:
120
  with open(pdf_path, "rb") as f:
121
  pdf_bytes = f.read()
122
+ plot_results, coverage = Pdf_ImageExtraction.extract_and_verify_plots(
123
  pdf_bytes, verify_engines=["gemini"]
124
  )
125
  # Drop captions naming photos/micrographs/logos and crops the verifier
 
656
  d1, d2 = st.columns(2)
657
  d1.download_button(
658
  "⬇ Images + metadata (ZIP)",
659
+ data=Pdf_ImageExtraction.create_plot_zip(plot_results, include_json=True),
660
  file_name=f"{paper_id}_plots.zip", mime="application/zip",
661
  use_container_width=True, key="dl_plots_zip",
662
  )
663
  d2.download_button(
664
  "⬇ Images only (ZIP)",
665
+ data=Pdf_ImageExtraction.create_plot_zip(plot_results, include_json=False),
666
  file_name=f"{paper_id}_images.zip", mime="application/zip",
667
  use_container_width=True, key="dl_images_zip",
668
  )