leonarb commited on
Commit
4f9eb00
·
verified ·
1 Parent(s): 02173a5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -23,10 +23,10 @@ def convert_pdf_to_html(pdf_file):
23
  )
24
 
25
  if result.returncode != 0:
26
- return f"Error during conversion:\n{result.stderr}"
27
 
28
  if not os.path.exists(output_path):
29
- return "Conversion failed: output HTML file not found."
30
 
31
  return output_path
32
 
@@ -37,6 +37,6 @@ gr.Interface(
37
  fn=convert_pdf_to_html,
38
  inputs=gr.File(label="Upload PDF", file_types=[".pdf"]),
39
  outputs=gr.File(label="Download HTML"),
40
- title="PDF to HTML Converter",
41
- description="Uses pdf2htmlEX to convert PDFs to standalone HTML."
42
  ).launch()
 
23
  )
24
 
25
  if result.returncode != 0:
26
+ return f"Error:\n{result.stderr}"
27
 
28
  if not os.path.exists(output_path):
29
+ return "Conversion failed: output HTML not found."
30
 
31
  return output_path
32
 
 
37
  fn=convert_pdf_to_html,
38
  inputs=gr.File(label="Upload PDF", file_types=[".pdf"]),
39
  outputs=gr.File(label="Download HTML"),
40
+ title="PDF to HTML",
41
+ description="Convert PDFs to self-contained HTML using pdf2htmlEX."
42
  ).launch()