Spaces:
Running
Running
πΈ add fancy error
Browse filesSigned-off-by: peter szemraj <[email protected]>
app.py
CHANGED
|
@@ -82,10 +82,11 @@ def convert_PDF(
|
|
| 82 |
|
| 83 |
html_error = f"""
|
| 84 |
<div style="color: red; font-size: 20px; font-weight: bold;">
|
| 85 |
-
File {file_path} is not a PDF file
|
| 86 |
</div>
|
| 87 |
"""
|
| 88 |
return "File is not a PDF file", html_error, None
|
|
|
|
| 89 |
conversion_stats = convert_PDF_to_Text(
|
| 90 |
file_path,
|
| 91 |
ocr_model=ocr_model,
|
|
|
|
| 82 |
|
| 83 |
html_error = f"""
|
| 84 |
<div style="color: red; font-size: 20px; font-weight: bold;">
|
| 85 |
+
File {file_path} is not a PDF file. Please upload a PDF file.
|
| 86 |
</div>
|
| 87 |
"""
|
| 88 |
return "File is not a PDF file", html_error, None
|
| 89 |
+
|
| 90 |
conversion_stats = convert_PDF_to_Text(
|
| 91 |
file_path,
|
| 92 |
ocr_model=ocr_model,
|