Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -211,12 +211,12 @@ def identify_headers_with_openrouter(pdf_path, model, LLM_prompt, pages_to_check
|
|
| 211 |
print("=" * 80)
|
| 212 |
|
| 213 |
# Also log to file
|
| 214 |
-
try:
|
| 215 |
-
|
| 216 |
-
|
| 217 |
-
|
| 218 |
-
except Exception as e:
|
| 219 |
-
|
| 220 |
|
| 221 |
if not api_key:
|
| 222 |
# No API key: return empty so caller can fallback to heuristics
|
|
|
|
| 211 |
print("=" * 80)
|
| 212 |
|
| 213 |
# Also log to file
|
| 214 |
+
# try:
|
| 215 |
+
# with open("full_prompt.txt", "w", encoding="utf-8") as f:
|
| 216 |
+
# f.write(prompt)
|
| 217 |
+
# logger.info("Full prompt saved to full_prompt.txt")
|
| 218 |
+
# except Exception as e:
|
| 219 |
+
# logger.error(f"Could not save prompt to file: {e}")
|
| 220 |
|
| 221 |
if not api_key:
|
| 222 |
# No API key: return empty so caller can fallback to heuristics
|