Spaces:
Running
Running
adrianpierce
commited on
Commit
•
6cd23b5
1
Parent(s):
5c51f19
Update pages/2_Saved_Recipes.py
Browse files- pages/2_Saved_Recipes.py +5 -5
pages/2_Saved_Recipes.py
CHANGED
@@ -11,11 +11,11 @@ for root, dirs, files in os.walk(directory_path):
|
|
11 |
for file in files:
|
12 |
if file.endswith('.json'):
|
13 |
full_path = os.path.join(root, file)
|
14 |
-
os.remove(full_path)
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
|
20 |
#st.json(saved_files)
|
21 |
|
|
|
11 |
for file in files:
|
12 |
if file.endswith('.json'):
|
13 |
full_path = os.path.join(root, file)
|
14 |
+
# os.remove(full_path)
|
15 |
+
f = open(full_path)
|
16 |
+
recipe_json = json.load(f)
|
17 |
+
recipe_json['file'] = file
|
18 |
+
recipes.append(recipe_json)
|
19 |
|
20 |
#st.json(saved_files)
|
21 |
|