Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -493,14 +493,14 @@ def main():
|
|
493 |
all_files.sort(key=lambda x: (os.path.splitext(x)[1], x), reverse=True) # sort by file type and file name in descending order
|
494 |
|
495 |
|
496 |
-
# Sidebar buttons Download All and
|
497 |
colDownloadAll, colDeleteAll = st.sidebar.columns([3,3])
|
498 |
with colDownloadAll:
|
499 |
-
if st.
|
500 |
zip_file = create_zip_of_files(all_files)
|
501 |
-
st.
|
502 |
with colDeleteAll:
|
503 |
-
if st.
|
504 |
for file in all_files:
|
505 |
os.remove(file)
|
506 |
st.experimental_rerun()
|
|
|
493 |
all_files.sort(key=lambda x: (os.path.splitext(x)[1], x), reverse=True) # sort by file type and file name in descending order
|
494 |
|
495 |
|
496 |
+
# Sidebar buttons Download All and Delete All
|
497 |
colDownloadAll, colDeleteAll = st.sidebar.columns([3,3])
|
498 |
with colDownloadAll:
|
499 |
+
if st.button("⬇️ Download All"):
|
500 |
zip_file = create_zip_of_files(all_files)
|
501 |
+
st.markdown(get_zip_download_link(zip_file), unsafe_allow_html=True)
|
502 |
with colDeleteAll:
|
503 |
+
if st.button("🗑 Delete All"):
|
504 |
for file in all_files:
|
505 |
os.remove(file)
|
506 |
st.experimental_rerun()
|