Update utils.py
Browse files
utils.py
CHANGED
|
@@ -347,10 +347,10 @@ def document_storage_chroma(splits):
|
|
| 347 |
embedding_fn = HuggingFaceEmbeddings(model_name=EMBEDDING_MODELL, model_kwargs={"device": "cpu"}, encode_kwargs={'normalize_embeddings': False})
|
| 348 |
|
| 349 |
# Vectorstore initialisieren und Dokumente hinzufügen
|
| 350 |
-
vectorstore = Chroma.from_documents(documents=splits, embedding=embedding_fn
|
| 351 |
retriever = vectorstore.as_retriever(search_kwargs = {"k": ANZAHL_DOCS})
|
| 352 |
# Persist the vectorstore to disk
|
| 353 |
-
vectorstore.persist()
|
| 354 |
|
| 355 |
return vectorstore, retriever
|
| 356 |
|
|
|
|
| 347 |
embedding_fn = HuggingFaceEmbeddings(model_name=EMBEDDING_MODELL, model_kwargs={"device": "cpu"}, encode_kwargs={'normalize_embeddings': False})
|
| 348 |
|
| 349 |
# Vectorstore initialisieren und Dokumente hinzufügen
|
| 350 |
+
vectorstore = Chroma.from_documents(documents=splits, embedding=embedding_fn) #, persist_directory = PATH_WORK + CHROMA_DIR)
|
| 351 |
retriever = vectorstore.as_retriever(search_kwargs = {"k": ANZAHL_DOCS})
|
| 352 |
# Persist the vectorstore to disk
|
| 353 |
+
#vectorstore.persist()
|
| 354 |
|
| 355 |
return vectorstore, retriever
|
| 356 |
|