Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -167,6 +167,8 @@ if uploaded_file is not None:
|
|
167 |
# Initialize embeddings and vectorstore
|
168 |
embedding_model = GoogleGenerativeAIEmbeddings(model="models/embedding-001")
|
169 |
db = Chroma.from_documents(chunks, embedding_model, persist_directory="./chroma_db")
|
|
|
|
|
170 |
|
171 |
db.persist()
|
172 |
|
|
|
167 |
# Initialize embeddings and vectorstore
|
168 |
embedding_model = GoogleGenerativeAIEmbeddings(model="models/embedding-001")
|
169 |
db = Chroma.from_documents(chunks, embedding_model, persist_directory="./chroma_db")
|
170 |
+
if not os.path.exists("./chroma_db"):
|
171 |
+
os.makedirs("./chroma_db")
|
172 |
|
173 |
db.persist()
|
174 |
|