Update functions.py
Browse files- functions.py +1 -1
functions.py
CHANGED
@@ -133,7 +133,7 @@ def process_corpus(corpus, _tokenizer, title, embedding_model, chunk_size=200, o
|
|
133 |
|
134 |
embeddings = gen_embeddings(embedding_model)
|
135 |
|
136 |
-
docsearch = FAISS.from_texts(texts, embeddings)
|
137 |
|
138 |
return docsearch
|
139 |
|
|
|
133 |
|
134 |
embeddings = gen_embeddings(embedding_model)
|
135 |
|
136 |
+
docsearch = FAISS.from_texts(texts, embeddings, metadatas=[{"source": i} for i in range(len(texts))])
|
137 |
|
138 |
return docsearch
|
139 |
|