Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -699,7 +699,7 @@ def main():
|
|
| 699 |
all_files = glob.glob("*.md")
|
| 700 |
all_files = [file for file in all_files if len(os.path.splitext(file)[0]) >= 10] # exclude files with short names
|
| 701 |
all_files.sort(key=lambda x: (os.path.splitext(x)[1], x), reverse=True) # sort by file type and file name in descending order
|
| 702 |
-
if st.sidebar.button("🗑 Delete All"):
|
| 703 |
for file in all_files:
|
| 704 |
os.remove(file)
|
| 705 |
st.experimental_rerun()
|
|
@@ -772,7 +772,7 @@ def main():
|
|
| 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)
|
| 778 |
st.experimental_rerun()
|
|
|
|
| 699 |
all_files = glob.glob("*.md")
|
| 700 |
all_files = [file for file in all_files if len(os.path.splitext(file)[0]) >= 10] # exclude files with short names
|
| 701 |
all_files.sort(key=lambda x: (os.path.splitext(x)[1], x), reverse=True) # sort by file type and file name in descending order
|
| 702 |
+
if st.sidebar.button("🗑 Delete All Text"):
|
| 703 |
for file in all_files:
|
| 704 |
os.remove(file)
|
| 705 |
st.experimental_rerun()
|
|
|
|
| 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 Audio", key=filekey):
|
| 776 |
for file in all_files:
|
| 777 |
os.remove(file)
|
| 778 |
st.experimental_rerun()
|