Enoch commited on
Commit
85f220c
·
1 Parent(s): d8555fc
Files changed (1) hide show
  1. app.py +10 -3
app.py CHANGED
@@ -341,11 +341,18 @@ def download_text(text):
341
  def clear_all():
342
  """清空所有输入和输出"""
343
  try:
344
- return [""] * 7 + ["", "", None] # 7个输入框 + 2个输出框 + 1个下载文件框(None)
 
 
 
 
345
  except Exception as e:
346
  print(f"清空过程中出错:{str(e)}")
347
- return [""] * 7 + ["", "", None]
348
-
 
 
 
349
  def cleanup_temp_files():
350
  """清理临时文件"""
351
  temp_dir = tempfile.gettempdir()
 
341
  def clear_all():
342
  """清空所有输入和输出"""
343
  try:
344
+ return (
345
+ "", "", "", "", "", "", "", # 7 个 Textbox
346
+ "", # 1 个 Markdown (final_output)
347
+ None # 1 个 File (download_file)
348
+ )
349
  except Exception as e:
350
  print(f"清空过程中出错:{str(e)}")
351
+ return (
352
+ "", "", "", "", "", "", "",
353
+ "",
354
+ None
355
+ )
356
  def cleanup_temp_files():
357
  """清理临时文件"""
358
  temp_dir = tempfile.gettempdir()