yashasgupta commited on
Commit
ddd5f48
·
verified ·
1 Parent(s): 2a18488

Update app.py

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