Spaces:
Runtime error
Runtime error
Commit
·
adce112
1
Parent(s):
3ec9647
Update app.py
Browse filesupdate upload function with param
app.py
CHANGED
@@ -357,10 +357,14 @@ def func_upload_file(files, chat_history):
|
|
357 |
# file_list_loaded = files
|
358 |
print(file_list_loaded)
|
359 |
# print(chat_history)
|
360 |
-
test_msg = ["Request Upload File into DB", "Operation Ongoing...."]
|
361 |
-
|
|
|
|
|
|
|
362 |
yield chat_history
|
363 |
-
|
|
|
364 |
test_msg = ["Request Upload File into DB", "Operation Finished"]
|
365 |
chat_history.append(test_msg)
|
366 |
yield chat_history
|
|
|
357 |
# file_list_loaded = files
|
358 |
print(file_list_loaded)
|
359 |
# print(chat_history)
|
360 |
+
# test_msg = ["Request Upload File into DB", "Operation Ongoing...."]
|
361 |
+
|
362 |
+
# chat_history.append(test_msg)
|
363 |
+
for file in files:
|
364 |
+
chat_history = chat_history + [((file.name,), None)]
|
365 |
yield chat_history
|
366 |
+
if os.getenv("SYS_Upload_Enable") == "1":
|
367 |
+
UpdateDb()
|
368 |
test_msg = ["Request Upload File into DB", "Operation Finished"]
|
369 |
chat_history.append(test_msg)
|
370 |
yield chat_history
|