MEOW commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -77,14 +77,14 @@ def load_documents(file_objs):
|
|
| 77 |
else:
|
| 78 |
print(f"Warning: Unsupported file type: {file_extension}")
|
| 79 |
|
| 80 |
-
file_paths = get_files_from_input(file_objs)
|
| 81 |
-
documents = []
|
| 82 |
-
for file_path in file_paths:
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
if not documents:
|
| 87 |
-
|
| 88 |
|
| 89 |
|
| 90 |
# Create a Milvus vector store and storage context
|
|
|
|
| 77 |
else:
|
| 78 |
print(f"Warning: Unsupported file type: {file_extension}")
|
| 79 |
|
| 80 |
+
# file_paths = get_files_from_input(file_objs)
|
| 81 |
+
#documents = []
|
| 82 |
+
#for file_path in file_paths:
|
| 83 |
+
# directory = os.path.dirname(file_path)
|
| 84 |
+
# documents.extend(SimpleDirectoryReader(input_files=[file_path]).load_data())
|
| 85 |
+
|
| 86 |
+
#if not documents:
|
| 87 |
+
# return f"No documents found in the selected files."
|
| 88 |
|
| 89 |
|
| 90 |
# Create a Milvus vector store and storage context
|