Spaces:
Running
Running
fix ranking
Browse files
app.py
CHANGED
@@ -54,13 +54,11 @@ def load_model(folders, tab_name, msg_lengths):
|
|
54 |
results[msg_lengths[task]].append(int(df['result'].sum() / len(df) * 100))
|
55 |
|
56 |
mean_score.append(-np.mean([float(results[msg_lengths[task]][i]) for task in list(msg_lengths.keys())[:5]]))
|
57 |
-
|
58 |
-
for i, rank in enumerate(ranks):
|
59 |
results['Rank'][i] = rank + 1
|
60 |
-
results['Model'][i] += f' ({mean_score[rank]})'
|
61 |
|
62 |
|
63 |
-
return pd.DataFrame(results).sort_values('Rank')
|
64 |
|
65 |
|
66 |
|
|
|
54 |
results[msg_lengths[task]].append(int(df['result'].sum() / len(df) * 100))
|
55 |
|
56 |
mean_score.append(-np.mean([float(results[msg_lengths[task]][i]) for task in list(msg_lengths.keys())[:5]]))
|
57 |
+
for rank, i in enumerate(np.argsort(mean_score)):
|
|
|
58 |
results['Rank'][i] = rank + 1
|
|
|
59 |
|
60 |
|
61 |
+
return pd.DataFrame(results).sort_values(['Rank'])
|
62 |
|
63 |
|
64 |
|