danicafisher commited on
Commit
b94fa9d
1 Parent(s): 3dd7eaa

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -5
app.py CHANGED
@@ -63,14 +63,12 @@ async def on_chat_start():
63
 
64
  # load the file
65
  docs = process_file(file)
66
- for i, doc in enumerate(docs):
67
- doc.metadata["source"] = f"source_{i}" # TO DO: Add metadata
68
- add_to_qdrant(doc, te3_small, qdrant_client, collection_name)
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
  )