OuroborosM commited on
Commit
adce112
·
1 Parent(s): 3ec9647

Update app.py

Browse files

update upload function with param

Files changed (1) hide show
  1. app.py +7 -3
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
- chat_history.append(test_msg)
 
 
 
362
  yield chat_history
363
- UpdateDb()
 
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