Commit
·
8ec3a0b
1
Parent(s):
f6d47e5
Fix JSON file retrieval in refresh_submissions to correctly handle file paths
Browse files- gradio_interface.py +2 -2
gradio_interface.py
CHANGED
@@ -27,8 +27,8 @@ def refresh_submissions():
|
|
27 |
if not os.path.exists(hub_path):
|
28 |
os.makedirs(hub_path) # empty repo case
|
29 |
print("os.listdir(hub_path):", os.listdir(hub_path))
|
30 |
-
json_files = [f for f in glob.glob(os.path.join(
|
31 |
-
hub_path, "**/*.json"), recursive=True) if f.endswith('.json')]
|
32 |
print("Downloaded submissions: ", json_files)
|
33 |
submissions = []
|
34 |
for file in json_files:
|
|
|
27 |
if not os.path.exists(hub_path):
|
28 |
os.makedirs(hub_path) # empty repo case
|
29 |
print("os.listdir(hub_path):", os.listdir(hub_path))
|
30 |
+
json_files = [f.split("/") for f in glob.glob(os.path.join(
|
31 |
+
hub_path, "**/*.json")[-1], recursive=True) if f.endswith('.json')]
|
32 |
print("Downloaded submissions: ", json_files)
|
33 |
submissions = []
|
34 |
for file in json_files:
|