stzhao commited on
Commit
468fd75
·
verified ·
1 Parent(s): b3def2c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -5,7 +5,7 @@ import os
5
 
6
  def pdf_to_png(pdf_file, dpi=300):
7
  # Open the PDF file
8
- pdf_document = fitz.open(stream=pdf_file.read(), filetype="pdf")
9
 
10
  # Create a temporary directory to store the PNG files
11
  output_folder = "temp_output_images"
 
5
 
6
  def pdf_to_png(pdf_file, dpi=300):
7
  # Open the PDF file
8
+ pdf_document = fitz.open(stream=pdf_file.name, filetype="pdf")
9
 
10
  # Create a temporary directory to store the PNG files
11
  output_folder = "temp_output_images"