Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -25,9 +25,14 @@ def delete_file():
|
|
| 25 |
for root, dirs, file_names in os.walk(path):
|
| 26 |
for file_name in file_names:
|
| 27 |
if st.button(file_name):
|
| 28 |
-
#
|
| 29 |
-
|
| 30 |
-
st.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 31 |
|
| 32 |
# File View
|
| 33 |
@st.dialog("Files used by AI")
|
|
@@ -43,9 +48,7 @@ def view_file():
|
|
| 43 |
st.rerun()
|
| 44 |
|
| 45 |
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
|
| 50 |
|
| 51 |
|
|
|
|
| 25 |
for root, dirs, file_names in os.walk(path):
|
| 26 |
for file_name in file_names:
|
| 27 |
if st.button(file_name):
|
| 28 |
+
# Confirm User Wants to do this
|
| 29 |
+
file_details = {"Confirm deletion of ":file_name}
|
| 30 |
+
st.write(file_details)
|
| 31 |
+
if st.button("Yes"):
|
| 32 |
+
os.remove(os.path.join(path,file_name))
|
| 33 |
+
st.rerun()
|
| 34 |
+
if st.button("No"):
|
| 35 |
+
st.rerun()
|
| 36 |
|
| 37 |
# File View
|
| 38 |
@st.dialog("Files used by AI")
|
|
|
|
| 48 |
st.rerun()
|
| 49 |
|
| 50 |
|
| 51 |
+
|
|
|
|
|
|
|
| 52 |
|
| 53 |
|
| 54 |
|