Spaces:
Runtime error
Runtime error
import json | |
import os | |
import pandas as pd | |
from src.display.formatting import has_no_nan_values, make_clickable_model | |
from src.display.utils import AutoEvalColumn, EvalQueueColumn | |
from datasets import load_dataset | |
def get_leaderboard_df(results_repo, results_path, dataset_version): | |
hf_leaderboard = load_dataset(results_repo, dataset_version, split="test", cache_dir=results_path) | |
df = hf_leaderboard.to_pandas() | |
df = df.sort_values(by="Total", ascending=False) | |
df = df.round(2) # Round all numeric columns to two decimal places | |
print(df) | |
return df | |