Spaces:
Runtime error
Runtime error
Update pdf_processor.py
Browse files- pdf_processor.py +1 -1
pdf_processor.py
CHANGED
|
@@ -335,7 +335,7 @@ class PDFProcessor:
|
|
| 335 |
# Step 2: Extract full text and split into sections
|
| 336 |
full_text, pages = self.extract_text_from_pdf(pdf_path)
|
| 337 |
sections = self.split_into_sections(full_text, os.path.basename(pdf_path))
|
| 338 |
-
results["sections"] =
|
| 339 |
results["page_count"] = len(pages)
|
| 340 |
|
| 341 |
# Step 3: Prepare chunks for vector store
|
|
|
|
| 335 |
# Step 2: Extract full text and split into sections
|
| 336 |
full_text, pages = self.extract_text_from_pdf(pdf_path)
|
| 337 |
sections = self.split_into_sections(full_text, os.path.basename(pdf_path))
|
| 338 |
+
results["sections"] = sections # Store the entire sections dictionary
|
| 339 |
results["page_count"] = len(pages)
|
| 340 |
|
| 341 |
# Step 3: Prepare chunks for vector store
|