Workpam commited on
Commit
86e2284
·
verified ·
1 Parent(s): 049cef7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -1
app.py CHANGED
@@ -446,9 +446,20 @@ def read_uploaded_workbook(file):
446
  return [], f"❌ Error: {e}"
447
 
448
  def clear_all(tmp_dir):
 
449
  if tmp_dir and os.path.exists(tmp_dir):
450
  shutil.rmtree(tmp_dir)
451
- return "", [], [], gr.update(visible=False), [], "Cleared.", None, ""
 
 
 
 
 
 
 
 
 
 
452
 
453
  # === CSS ===
454
  css = """
 
446
  return [], f"❌ Error: {e}"
447
 
448
  def clear_all(tmp_dir):
449
+ # wipe out the temp folder if it exists
450
  if tmp_dir and os.path.exists(tmp_dir):
451
  shutil.rmtree(tmp_dir)
452
+ return (
453
+ None, # clear the single‐file upload
454
+ [], # reset the image_data_state
455
+ [], # clear the multi‐file upload
456
+ gr.update(visible=False, value=None), # hide & clear the hidden ZIP file
457
+ [], # clear the “individual downloads” list
458
+ "Cleared.", # status message
459
+ None, # reset temp_dir_state
460
+ "" # clear the URL textbox
461
+ )
462
+
463
 
464
  # === CSS ===
465
  css = """