Spaces:
Runtime error
Runtime error
Tom Aarsen
commited on
Commit
·
cef3366
1
Parent(s):
13c106f
Prevent crash for empty task
Browse files
app.py
CHANGED
|
@@ -100,6 +100,8 @@ DATASETS = []
|
|
| 100 |
MODELS = []
|
| 101 |
# LANGUAGES = []
|
| 102 |
for d in all_data_tasks:
|
|
|
|
|
|
|
| 103 |
# NUM_SCORES += d.iloc[:, 1:].apply(lambda x: sum([1 for y in x if isinstance(y, float) and not np.isnan(y)]), axis=1).sum()
|
| 104 |
cols_to_ignore = 4 if "Average" in d.columns else 3
|
| 105 |
# Count number of scores including only non-nan floats & excluding the rank column
|
|
|
|
| 100 |
MODELS = []
|
| 101 |
# LANGUAGES = []
|
| 102 |
for d in all_data_tasks:
|
| 103 |
+
if isinstance(d, list) and len(d) == 0:
|
| 104 |
+
continue
|
| 105 |
# NUM_SCORES += d.iloc[:, 1:].apply(lambda x: sum([1 for y in x if isinstance(y, float) and not np.isnan(y)]), axis=1).sum()
|
| 106 |
cols_to_ignore = 4 if "Average" in d.columns else 3
|
| 107 |
# Count number of scores including only non-nan floats & excluding the rank column
|