Spaces:
Running
Running
adrianpierce
commited on
Commit
•
80d7df8
1
Parent(s):
7e66262
Update pages/2_Saved_Recipes.py
Browse files- pages/2_Saved_Recipes.py +21 -3
pages/2_Saved_Recipes.py
CHANGED
@@ -2,7 +2,25 @@ import streamlit as st
|
|
2 |
import json
|
3 |
st.write("Saved")
|
4 |
|
5 |
-
|
6 |
-
json_test = json.load(f)
|
7 |
|
8 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
import json
|
3 |
st.write("Saved")
|
4 |
|
5 |
+
import os
|
|
|
6 |
|
7 |
+
# Path to the directory you want to search
|
8 |
+
directory_path = '/data/'
|
9 |
+
|
10 |
+
# List to hold all python files
|
11 |
+
python_files = []
|
12 |
+
|
13 |
+
# Walk through directory
|
14 |
+
for root, dirs, files in os.walk(directory_path):
|
15 |
+
for file in files:
|
16 |
+
if file.endswith('.json'):
|
17 |
+
# Create full path to file
|
18 |
+
full_path = os.path.join(root, file)
|
19 |
+
python_files.append(full_path)
|
20 |
+
|
21 |
+
st.write(python_files)
|
22 |
+
|
23 |
+
# f = open('/data/test_output.json')
|
24 |
+
# json_test = json.load(f)
|
25 |
+
|
26 |
+
# st.json(json_test)
|