cryogenic22 commited on
Commit
88bb2e2
·
verified ·
1 Parent(s): 6a13f3d

Update pdf_processor.py

Browse files
Files changed (1) hide show
  1. 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"] = list(sections.keys())
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