yashasgupta commited on
Commit
20e3703
·
verified ·
1 Parent(s): ddd5f48

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -167,8 +167,12 @@ 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
- if not os.path.exists("./chroma_db"):
171
- os.makedirs("./chroma_db")
 
 
 
 
172
 
173
  db.persist()
174
 
 
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
+ print(f"Current working directory: {os.getcwd()}")
171
+
172
+ # Check if the 'static' directory exists
173
+ if not os.path.exists('static'):
174
+ print("'static' directory does not exist. Creating it...")
175
+ os.makedirs('static')
176
 
177
  db.persist()
178