Spaces:
Runtime error
Runtime error
处理没有文件返回的问题
Browse files- toolbox.py +1 -3
toolbox.py
CHANGED
@@ -303,9 +303,7 @@ def on_file_uploaded(files, chatbot, txt):
|
|
303 |
def on_report_generated(files, chatbot):
|
304 |
from toolbox import find_recent_files
|
305 |
report_files = find_recent_files('gpt_log')
|
306 |
-
if len(report_files) == 0:
|
307 |
-
if files is None: return None, chatbot
|
308 |
-
else: return [], chatbot
|
309 |
# files.extend(report_files)
|
310 |
chatbot.append(['汇总报告如何远程获取?', '汇总报告已经添加到右侧“文件上传区”(可能处于折叠状态),请查收。'])
|
311 |
return report_files, chatbot
|
|
|
303 |
def on_report_generated(files, chatbot):
|
304 |
from toolbox import find_recent_files
|
305 |
report_files = find_recent_files('gpt_log')
|
306 |
+
if len(report_files) == 0: return None, chatbot
|
|
|
|
|
307 |
# files.extend(report_files)
|
308 |
chatbot.append(['汇总报告如何远程获取?', '汇总报告已经添加到右侧“文件上传区”(可能处于折叠状态),请查收。'])
|
309 |
return report_files, chatbot
|