Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -248,6 +248,7 @@ def process_data_files():
|
|
| 248 |
print(f"ERROR accessing data folder: {e}")
|
| 249 |
|
| 250 |
return context_data
|
|
|
|
| 251 |
def create_vectorstore(data):
|
| 252 |
"""
|
| 253 |
Creates and returns a Chroma vector store populated with the provided data.
|
|
@@ -278,7 +279,8 @@ def create_vectorstore(data):
|
|
| 278 |
except Exception as e:
|
| 279 |
print(f"❌ Failed to add documents to vector store: {e}")
|
| 280 |
|
| 281 |
-
|
|
|
|
| 282 |
|
| 283 |
|
| 284 |
def create_rag_chain():
|
|
|
|
| 248 |
print(f"ERROR accessing data folder: {e}")
|
| 249 |
|
| 250 |
return context_data
|
| 251 |
+
|
| 252 |
def create_vectorstore(data):
|
| 253 |
"""
|
| 254 |
Creates and returns a Chroma vector store populated with the provided data.
|
|
|
|
| 279 |
except Exception as e:
|
| 280 |
print(f"❌ Failed to add documents to vector store: {e}")
|
| 281 |
|
| 282 |
+
# Fix: Return vectorstore instead of vs
|
| 283 |
+
return vectorstore # Changed from 'return vs' to 'return vectorstore'
|
| 284 |
|
| 285 |
|
| 286 |
def create_rag_chain():
|