Spaces:
Running
Running
xhluca
commited on
Commit
•
def6b42
1
Parent(s):
4b630e2
Update app to show warning when metadata file is not found
Browse files
app.py
CHANGED
@@ -136,7 +136,11 @@ def load_recording(basedir):
|
|
136 |
"Enable HTML download", False, key="enable_html_download"
|
137 |
)
|
138 |
replay_file = replay_file.replace(".json", "")
|
139 |
-
|
|
|
|
|
|
|
|
|
140 |
metadata = load_json_no_cache(basedir, "metadata")
|
141 |
|
142 |
# convert timestamp to readable date string
|
|
|
136 |
"Enable HTML download", False, key="enable_html_download"
|
137 |
)
|
138 |
replay_file = replay_file.replace(".json", "")
|
139 |
+
|
140 |
+
if not Path(basedir).joinpath('metadata.json').exists():
|
141 |
+
st.sidebar.error(f"Metadata file not found at {basedir}/metadata.json. This is likely an issue with Huggingface Spaces. Try cloning this repo and running locally.")
|
142 |
+
st.stop()
|
143 |
+
|
144 |
metadata = load_json_no_cache(basedir, "metadata")
|
145 |
|
146 |
# convert timestamp to readable date string
|