Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Tom Aarsen
commited on
Commit
•
4a7f1c7
1
Parent(s):
b50c34e
Prevent crash if model-index metadata not specified in model card
Browse files
app.py
CHANGED
@@ -882,6 +882,8 @@ def get_mteb_data(tasks=["Clustering"], langs=[], datasets=[], fillna=True, add_
|
|
882 |
print("MODEL", model)
|
883 |
readme_path = hf_hub_download(model.modelId, filename="README.md")
|
884 |
meta = metadata_load(readme_path)
|
|
|
|
|
885 |
# meta['model-index'][0]["results"] is list of elements like:
|
886 |
# {
|
887 |
# "task": {"type": "Classification"},
|
|
|
882 |
print("MODEL", model)
|
883 |
readme_path = hf_hub_download(model.modelId, filename="README.md")
|
884 |
meta = metadata_load(readme_path)
|
885 |
+
if "model-index" not in meta:
|
886 |
+
continue
|
887 |
# meta['model-index'][0]["results"] is list of elements like:
|
888 |
# {
|
889 |
# "task": {"type": "Classification"},
|