Spaces:
Running
Running
Push Bot
commited on
Commit
·
2cab1ca
1
Parent(s):
338aa8b
Preview-only image: hide all PDF HTML previews; debug flows return only PDF path; pipeline stops building PDF HTML
Browse files
app.py
CHANGED
|
@@ -850,9 +850,8 @@ def debug_compile_last_pipeline_zip():
|
|
| 850 |
None,
|
| 851 |
)
|
| 852 |
try:
|
| 853 |
-
html = _pdf_preview_html(pdf_path, height="700px")
|
| 854 |
_write_logs(LOG_PATH, logs)
|
| 855 |
-
return
|
| 856 |
except Exception as e:
|
| 857 |
logs.append(f"⚠️ preview failed: {e}")
|
| 858 |
_write_logs(LOG_PATH, logs)
|
|
@@ -954,9 +953,8 @@ def debug_compile_uploaded_zip(zip_file):
|
|
| 954 |
None,
|
| 955 |
)
|
| 956 |
try:
|
| 957 |
-
html = _pdf_preview_html(pdf_path, height="700px")
|
| 958 |
_write_logs(LOG_PATH, logs)
|
| 959 |
-
return
|
| 960 |
except Exception as e:
|
| 961 |
logs.append(f"⚠️ preview failed: {e}")
|
| 962 |
_write_logs(LOG_PATH, logs)
|
|
@@ -1333,7 +1331,7 @@ def run_pipeline(arxiv_url, pdf_file, openai_key, logo_files, meeting_logo_file,
|
|
| 1333 |
_write_logs(LOG_PATH, logs)
|
| 1334 |
yield "\n".join(logs), "", None, None, ""
|
| 1335 |
|
| 1336 |
-
# ====== Compile PDF (for
|
| 1337 |
pdf_html = ""
|
| 1338 |
compiled_pdf_file = None
|
| 1339 |
try:
|
|
@@ -1342,9 +1340,9 @@ def run_pipeline(arxiv_url, pdf_file, openai_key, logo_files, meeting_logo_file,
|
|
| 1342 |
# Prefer file-served iframe to avoid large data: URIs and browser blocks
|
| 1343 |
pdf_html = _pdf_to_iframe_file(pdf_path)
|
| 1344 |
compiled_pdf_file = str(pdf_path)
|
| 1345 |
-
logs.append("🖨️ PDF
|
| 1346 |
except Exception as e:
|
| 1347 |
-
logs.append(f"⚠️ PDF compile
|
| 1348 |
|
| 1349 |
# ====== Zip output (run-local) ======
|
| 1350 |
try:
|
|
|
|
| 850 |
None,
|
| 851 |
)
|
| 852 |
try:
|
|
|
|
| 853 |
_write_logs(LOG_PATH, logs)
|
| 854 |
+
return "", str(pdf_path)
|
| 855 |
except Exception as e:
|
| 856 |
logs.append(f"⚠️ preview failed: {e}")
|
| 857 |
_write_logs(LOG_PATH, logs)
|
|
|
|
| 953 |
None,
|
| 954 |
)
|
| 955 |
try:
|
|
|
|
| 956 |
_write_logs(LOG_PATH, logs)
|
| 957 |
+
return "", str(pdf_path)
|
| 958 |
except Exception as e:
|
| 959 |
logs.append(f"⚠️ preview failed: {e}")
|
| 960 |
_write_logs(LOG_PATH, logs)
|
|
|
|
| 1331 |
_write_logs(LOG_PATH, logs)
|
| 1332 |
yield "\n".join(logs), "", None, None, ""
|
| 1333 |
|
| 1334 |
+
# ====== Compile PDF (for download + image preview) ======
|
| 1335 |
pdf_html = ""
|
| 1336 |
compiled_pdf_file = None
|
| 1337 |
try:
|
|
|
|
| 1340 |
# Prefer file-served iframe to avoid large data: URIs and browser blocks
|
| 1341 |
pdf_html = _pdf_to_iframe_file(pdf_path)
|
| 1342 |
compiled_pdf_file = str(pdf_path)
|
| 1343 |
+
logs.append("🖨️ PDF compiled (image preview available).")
|
| 1344 |
except Exception as e:
|
| 1345 |
+
logs.append(f"⚠️ PDF compile skipped: {e}")
|
| 1346 |
|
| 1347 |
# ====== Zip output (run-local) ======
|
| 1348 |
try:
|