Your Name commited on
Commit
d08edf7
1 Parent(s): 127588c

Merge branch 'master' of github.com:binary-husky/chatgpt_academic

Browse files
Files changed (1) hide show
  1. functional_crazy.py +2 -0
functional_crazy.py CHANGED
@@ -39,6 +39,7 @@ def get_crazy_functionals():
39
  }
40
 
41
  def on_file_uploaded(files, chatbot, txt):
 
42
  import shutil, os, time, glob
43
  from toolbox import extract_archive
44
  try: shutil.rmtree('./private_upload/')
@@ -60,6 +61,7 @@ def on_file_uploaded(files, chatbot, txt):
60
  def on_report_generated(files, chatbot):
61
  from toolbox import find_recent_files
62
  report_files = find_recent_files('gpt_log')
 
63
  # files.extend(report_files)
64
  chatbot.append(['汇总报告如何远程获取?', '汇总报告已经添加到右侧文件上传区,请查收。'])
65
  return report_files, chatbot
 
39
  }
40
 
41
  def on_file_uploaded(files, chatbot, txt):
42
+ if len(files) == 0: return chatbot, txt
43
  import shutil, os, time, glob
44
  from toolbox import extract_archive
45
  try: shutil.rmtree('./private_upload/')
 
61
  def on_report_generated(files, chatbot):
62
  from toolbox import find_recent_files
63
  report_files = find_recent_files('gpt_log')
64
+ if len(report_files) == 0: return report_files, chatbot
65
  # files.extend(report_files)
66
  chatbot.append(['汇总报告如何远程获取?', '汇总报告已经添加到右侧文件上传区,请查收。'])
67
  return report_files, chatbot