Spaces:
Sleeping
Sleeping
Commit
·
6a798f1
1
Parent(s):
4e7ea21
Update pages/2_Saved_Recipes.py
Browse files- pages/2_Saved_Recipes.py +6 -1
pages/2_Saved_Recipes.py
CHANGED
@@ -36,7 +36,12 @@ elif user_sort == 'Random':
|
|
36 |
for recipe in recipes_filtered:
|
37 |
with st.expander(recipe['name']):
|
38 |
st.markdown(recipe['md'])
|
39 |
-
|
|
|
|
|
|
|
|
|
|
|
40 |
|
41 |
|
42 |
# ignore
|
|
|
36 |
for recipe in recipes_filtered:
|
37 |
with st.expander(recipe['name']):
|
38 |
st.markdown(recipe['md'])
|
39 |
+
if st.session_state.admin = True:
|
40 |
+
st.write('')
|
41 |
+
st.write(recipe['file'])
|
42 |
+
with st.button("Delete"):
|
43 |
+
if os.path.exists(f"/data/{recipe['file']}"):
|
44 |
+
os.remove(f"/data/{recipe['file']}")
|
45 |
|
46 |
|
47 |
# ignore
|