Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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
|
| 27 |
|
| 28 |
if not os.path.exists(output_path):
|
| 29 |
-
return "Conversion failed: output HTML
|
| 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
|
| 41 |
-
description="
|
| 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()
|