Spaces:
Build error
Build error
fix document loader
Browse files
app.py
CHANGED
@@ -243,7 +243,7 @@ def respond(
|
|
243 |
|
244 |
def upload_documents(files):
|
245 |
for file in files:
|
246 |
-
loader =
|
247 |
documents = loader.load_documents()
|
248 |
chroma_manager.add_documents(documents)
|
249 |
return "Documents uploaded and processed successfully!"
|
|
|
243 |
|
244 |
def upload_documents(files):
|
245 |
for file in files:
|
246 |
+
loader = UnstructuredFileLoader(file.name)
|
247 |
documents = loader.load_documents()
|
248 |
chroma_manager.add_documents(documents)
|
249 |
return "Documents uploaded and processed successfully!"
|