Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -163,7 +163,7 @@ def identify_headers_with_openrouter(pdf_path, model, LLM_prompt, pages_to_check
|
|
| 163 |
# ArrayofTextWithFormat={'Font':s.get('font')},{'Size':s.get('size')},{'Flags':s.get('flags')},{'Color':s.get('color')},{'Text':s.get('text')}
|
| 164 |
|
| 165 |
# prefix with page for easier mapping back
|
| 166 |
-
text =
|
| 167 |
lines_for_prompt.append(f"PAGE {pno+1}: {text}")
|
| 168 |
|
| 169 |
# if not lines_for_prompt:
|
|
|
|
| 163 |
# ArrayofTextWithFormat={'Font':s.get('font')},{'Size':s.get('size')},{'Flags':s.get('flags')},{'Color':s.get('color')},{'Text':s.get('text')}
|
| 164 |
|
| 165 |
# prefix with page for easier mapping back
|
| 166 |
+
text = s["text"].strip()
|
| 167 |
lines_for_prompt.append(f"PAGE {pno+1}: {text}")
|
| 168 |
|
| 169 |
# if not lines_for_prompt:
|