sblumenf commited on
Commit
b7f45c8
·
verified ·
1 Parent(s): 0373a08

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -1,6 +1,5 @@
1
  import gradio as gr
2
  import fitz # PyMuPDF for PDF handling
3
- import os
4
 
5
  def convert_pdf(input_file, output_format):
6
  """
@@ -13,7 +12,8 @@ def convert_pdf(input_file, output_format):
13
  Returns:
14
  Path to the converted file.
15
  """
16
- pdf_document = fitz.open(input_file.name) # Open the PDF file with PyMuPDF
 
17
 
18
  output_file_path = f"output.{output_format.split(' ')[0].lower()}"
19
 
 
1
  import gradio as gr
2
  import fitz # PyMuPDF for PDF handling
 
3
 
4
  def convert_pdf(input_file, output_format):
5
  """
 
12
  Returns:
13
  Path to the converted file.
14
  """
15
+ # Open the PDF file using PyMuPDF (fitz)
16
+ pdf_document = fitz.open(input_file.name)
17
 
18
  output_file_path = f"output.{output_format.split(' ')[0].lower()}"
19