Update app.py
Browse files
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
|