kivilaid commited on
Commit
b18b09a
·
verified ·
1 Parent(s): 74aafac

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -5,7 +5,7 @@ import shutil
5
  from PIL import Image
6
 
7
  def extract_images_pymupdf(pdf_file):
8
- pdf_path = "extract_images/input_docs/uploaded_pdf.pdf"
9
  with open(pdf_path, "wb") as f:
10
  f.write(pdf_file)
11
 
@@ -30,7 +30,6 @@ def clear_directory(directory):
30
 
31
  def handle_pymupdf_extraction(pdf_file):
32
  images = extract_images_pymupdf(pdf_file)
33
- clear_directory("extract_images/image_outputs")
34
  return images
35
 
36
  interface = gr.Interface(
 
5
  from PIL import Image
6
 
7
  def extract_images_pymupdf(pdf_file):
8
+ pdf_path = "uploaded_pdf.pdf"
9
  with open(pdf_path, "wb") as f:
10
  f.write(pdf_file)
11
 
 
30
 
31
  def handle_pymupdf_extraction(pdf_file):
32
  images = extract_images_pymupdf(pdf_file)
 
33
  return images
34
 
35
  interface = gr.Interface(