Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
|
171 |
-
|
|
|
|
|
|
|
|
|
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 |
|