Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -771,7 +771,7 @@ def main():
|
|
771 |
all_files = [file for file in all_files if len(os.path.splitext(file)[0]) >= 10] # exclude files with short names
|
772 |
all_files.sort(key=lambda x: (os.path.splitext(x)[1], x), reverse=True) # sort by file type and file name in descending order
|
773 |
|
774 |
-
filekey = '
|
775 |
if st.sidebar.button("🗑 Delete All", key=filekey):
|
776 |
for file in all_files:
|
777 |
os.remove(file)
|
|
|
771 |
all_files = [file for file in all_files if len(os.path.splitext(file)[0]) >= 10] # exclude files with short names
|
772 |
all_files.sort(key=lambda x: (os.path.splitext(x)[1], x), reverse=True) # sort by file type and file name in descending order
|
773 |
|
774 |
+
filekey = 'delall'
|
775 |
if st.sidebar.button("🗑 Delete All", key=filekey):
|
776 |
for file in all_files:
|
777 |
os.remove(file)
|