Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -297,8 +297,7 @@ def run_ocr(uploaded_file):
|
|
| 297 |
hdr = extract_pdf_text_in_band(path, page_num, 0, PDF_HEADER_BAND_FRAC)
|
| 298 |
if not (hdr and hdr.strip()):
|
| 299 |
hdr = ocr_zone(img_path, 0, he)
|
| 300 |
-
|
| 301 |
-
if hdr and hdr.strip() and hdr.strip()[:80] not in page_md:
|
| 302 |
parts.append(hdr.strip())
|
| 303 |
|
| 304 |
if page_md:
|
|
|
|
| 297 |
hdr = extract_pdf_text_in_band(path, page_num, 0, PDF_HEADER_BAND_FRAC)
|
| 298 |
if not (hdr and hdr.strip()):
|
| 299 |
hdr = ocr_zone(img_path, 0, he)
|
| 300 |
+
if hdr and hdr.strip():
|
|
|
|
| 301 |
parts.append(hdr.strip())
|
| 302 |
|
| 303 |
if page_md:
|