ArturG9 commited on
Commit
5401b17
1 Parent(s): fbac59c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -28,6 +28,9 @@ def get_vectorstore(text_chunks):
28
  model_kwargs=model_kwargs,
29
  encode_kwargs=encode_kwargs
30
  )
 
 
 
31
  vectorstore = Chroma.from_documents(
32
  documents=text_chunks, embedding=embeddings, persist_directory="docs/chroma/")
33
  return vectorstore
 
28
  model_kwargs=model_kwargs,
29
  encode_kwargs=encode_kwargs
30
  )
31
+ vectorstore_path = "docs/chroma/"
32
+ if not os.path.exists(vectorstore_path):
33
+ os.makedirs(vectorstore_path)
34
  vectorstore = Chroma.from_documents(
35
  documents=text_chunks, embedding=embeddings, persist_directory="docs/chroma/")
36
  return vectorstore