adrianpierce commited on
Commit
56dbafa
1 Parent(s): 15af098

Update pages/2_Saved_Recipes.py

Browse files
Files changed (1) hide show
  1. pages/2_Saved_Recipes.py +8 -5
pages/2_Saved_Recipes.py CHANGED
@@ -11,13 +11,16 @@ 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
- saved_files.append(full_path)
 
 
15
 
16
- st.write(saved_files)
17
 
18
- for file in saved_files:
19
- with st.expander(file):
20
- st.write("test")
 
21
 
22
  # f = open('/data/test_output.json')
23
  # json_test = json.load(f)
 
11
  for file in files:
12
  if file.endswith('.json'):
13
  full_path = os.path.join(root, file)
14
+ f = open(full_path)
15
+ recipe_json = json.load(f)
16
+ saved_files.append(recipe_json)
17
 
18
+ #st.write(saved_files)
19
 
20
+ for recipe in saved_files:
21
+ with st.expander(recipe['name']):
22
+ st.markdown(recipe['md'])
23
+
24
 
25
  # f = open('/data/test_output.json')
26
  # json_test = json.load(f)