Spaces:
Runtime error
Runtime error
Update utils/pdf_processor.py
Browse files- utils/pdf_processor.py +3 -0
utils/pdf_processor.py
CHANGED
@@ -38,6 +38,9 @@ def extract_bns_sections(pdf_path: str) -> Dict[str, str]:
|
|
38 |
else:
|
39 |
if current_section:
|
40 |
current_text.append(text)
|
|
|
|
|
|
|
41 |
|
42 |
if current_section and current_text:
|
43 |
sections[current_section] = clean_section_text("\n".join(current_text))
|
|
|
38 |
else:
|
39 |
if current_section:
|
40 |
current_text.append(text)
|
41 |
+
except Exception as e:
|
42 |
+
print(f"Error processing page: {str(e)}")
|
43 |
+
continue
|
44 |
|
45 |
if current_section and current_text:
|
46 |
sections[current_section] = clean_section_text("\n".join(current_text))
|