alexkueck commited on
Commit
5d062cb
·
verified ·
1 Parent(s): fb560d0

Update utils.py

Browse files
Files changed (1) hide show
  1. utils.py +2 -2
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, 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
 
 
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