Update app.py
Browse files
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.
|
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"
|