Spaces:
Running
Running
Update app.py
Browse files
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 = """
|