Update space
Browse files- src/populate.py +3 -0
src/populate.py
CHANGED
|
@@ -2,6 +2,7 @@ import json
|
|
| 2 |
import os
|
| 3 |
|
| 4 |
import pandas as pd
|
|
|
|
| 5 |
|
| 6 |
from src.display.formatting import has_no_nan_values, make_clickable_model
|
| 7 |
from src.display.utils import AutoEvalColumn, EvalQueueColumn
|
|
@@ -28,6 +29,8 @@ def get_model_leaderboard_df(results_path: str, requests_path: str="", cols: lis
|
|
| 28 |
df["Average Rank"] = avg_rank
|
| 29 |
df = df.sort_values(by=["Average Rank"], ascending=True)
|
| 30 |
df = df.fillna('--')
|
|
|
|
|
|
|
| 31 |
|
| 32 |
for col in benchmark_cols:
|
| 33 |
# print(col)
|
|
|
|
| 2 |
import os
|
| 3 |
|
| 4 |
import pandas as pd
|
| 5 |
+
import numpy as np
|
| 6 |
|
| 7 |
from src.display.formatting import has_no_nan_values, make_clickable_model
|
| 8 |
from src.display.utils import AutoEvalColumn, EvalQueueColumn
|
|
|
|
| 29 |
df["Average Rank"] = avg_rank
|
| 30 |
df = df.sort_values(by=["Average Rank"], ascending=True)
|
| 31 |
df = df.fillna('--')
|
| 32 |
+
rank = np.arange(1, len(df)+1)
|
| 33 |
+
df.insert(0, 'Rank', rank)
|
| 34 |
|
| 35 |
for col in benchmark_cols:
|
| 36 |
# print(col)
|