Spaces:
Runtime error
Runtime error
Muennighoff
commited on
Commit
•
0ef2874
1
Parent(s):
b50c34e
Prevent crash if model-index metadata not specified in model card (#59)
Browse files- Prevent crash if model-index metadata not specified in model card (4a7f1c79ebfdf77252f037a9d3cc706d21e68813)
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"},
|