diff --git a/functional_crazy.py b/functional_crazy.py index 101edcf..d537573 100644 --- a/functional_crazy.py +++ b/functional_crazy.py @@ -39,6 +39,7 @@ def get_crazy_functionals(): } def on_file_uploaded(files, chatbot, txt): + if len(files) == 0: return chatbot, txt import shutil, os, time, glob from toolbox import extract_archive try: shutil.rmtree('./private_upload/') @@ -60,6 +61,7 @@ def on_file_uploaded(files, chatbot, txt): def on_report_generated(files, chatbot): from toolbox import find_recent_files report_files = find_recent_files('gpt_log') + if len(report_files) == 0: return report_files, chatbot # files.extend(report_files) chatbot.append(['汇总报告如何远程获取?', '汇总报告已经添加到右侧文件上传区,请查收。']) return report_files, chatbot