Spaces:
Runtime error
Runtime error
Commit
·
73f1d5f
1
Parent(s):
d5513fd
Update filelist func
Browse files
app.py
CHANGED
@@ -85,7 +85,8 @@ LOADER_MAPPING = {
|
|
85 |
}
|
86 |
|
87 |
source_directory = 'Upload Files'
|
88 |
-
|
|
|
89 |
chunk_size = 500
|
90 |
chunk_overlap = 300
|
91 |
|
@@ -159,9 +160,10 @@ def process_documents_2(ignored_files: List[str] = []) -> List[Document]:
|
|
159 |
"""
|
160 |
Load documents and split in chunks
|
161 |
"""
|
|
|
162 |
print(f"Loading documents from {source_directory}")
|
163 |
-
print("File Path to start processing:",
|
164 |
-
documents = load_documents_2(
|
165 |
if not documents:
|
166 |
print("No new documents to load")
|
167 |
exit(0)
|
@@ -347,8 +349,9 @@ def chathmi2(message, history):
|
|
347 |
# chatbot = gr.Chatbot(color_map =("blue", "pink"))
|
348 |
|
349 |
def func_upload_file(files, chat_history):
|
350 |
-
|
351 |
-
|
|
|
352 |
# print(chat_history)
|
353 |
test_msg = ["Request Upload File into DB", "Operation Ongoing...."]
|
354 |
chat_history.append(test_msg)
|
|
|
85 |
}
|
86 |
|
87 |
source_directory = 'Upload Files'
|
88 |
+
global file_list_loaded
|
89 |
+
file_list_loaded = ''
|
90 |
chunk_size = 500
|
91 |
chunk_overlap = 300
|
92 |
|
|
|
160 |
"""
|
161 |
Load documents and split in chunks
|
162 |
"""
|
163 |
+
global file_list_loaded
|
164 |
print(f"Loading documents from {source_directory}")
|
165 |
+
print("File Path to start processing:", file_list_loaded)
|
166 |
+
documents = load_documents_2(file_list_loaded, ignored_files)
|
167 |
if not documents:
|
168 |
print("No new documents to load")
|
169 |
exit(0)
|
|
|
349 |
# chatbot = gr.Chatbot(color_map =("blue", "pink"))
|
350 |
|
351 |
def func_upload_file(files, chat_history):
|
352 |
+
global file_list_loaded
|
353 |
+
file_list_loaded = files
|
354 |
+
print(file_list_loaded)
|
355 |
# print(chat_history)
|
356 |
test_msg = ["Request Upload File into DB", "Operation Ongoing...."]
|
357 |
chat_history.append(test_msg)
|