Rathapoom commited on
Commit
ff34bbf
·
verified ·
1 Parent(s): 87cdd83

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -25,7 +25,7 @@ pdf_text = extract_text_from_pdf(pdf_path)
25
  passages = [{"title": "", "text": line} for line in pdf_text.split('\n') if line.strip()]
26
 
27
  # Create a Dataset
28
- dataset = Dataset.from_list(passages)
29
 
30
  # Save the dataset and create an index in the current working directory
31
  dataset_path = "/home/user/app/rag_document_dataset"
 
25
  passages = [{"title": "", "text": line} for line in pdf_text.split('\n') if line.strip()]
26
 
27
  # Create a Dataset
28
+ dataset = Dataset.from_dict({"title": [p["title"] for p in passages], "text": [p["text"] for p in passages]})
29
 
30
  # Save the dataset and create an index in the current working directory
31
  dataset_path = "/home/user/app/rag_document_dataset"