Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -63,14 +63,12 @@ async def on_chat_start():
|
|
| 63 |
|
| 64 |
# load the file
|
| 65 |
docs = process_file(file)
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
print(f"Processing {len(docs)} text chunks")
|
| 70 |
|
| 71 |
# Add to the qdrant_store
|
| 72 |
-
splits = text_splitter.split_documents(docs)
|
| 73 |
-
|
| 74 |
qdrant_store.add_documents(
|
| 75 |
documents=splits
|
| 76 |
)
|
|
|
|
| 63 |
|
| 64 |
# load the file
|
| 65 |
docs = process_file(file)
|
| 66 |
+
splits = text_splitter.split_documents(docs)
|
| 67 |
+
for i, doc in enumerate(splits):
|
| 68 |
+
doc.metadata["source"] = f"source_{i}"
|
| 69 |
print(f"Processing {len(docs)} text chunks")
|
| 70 |
|
| 71 |
# Add to the qdrant_store
|
|
|
|
|
|
|
| 72 |
qdrant_store.add_documents(
|
| 73 |
documents=splits
|
| 74 |
)
|