from huggingface_hub import HfApi def get_leaderboard_models(): api = HfApi() # List all files in the "open_llm_leaderboard" directory of the Space files = api.list_files_info( repo_id="open-llm-leaderboard/open_llm_leaderboard", path="open_llm_leaderboard", repo_type="space" ) models = [] for file in files: if "-details" in file.path and "__" in file.path: # Extract provider and model name from filename filename = file.path.split("/")[-1].replace("-details", "") provider, model = filename.split("__", 1) models.append(f"{provider}/{model}") return sorted(list(set(models))) # Remove duplicates def get_leaderboard_datasets(): return [ "ai2_arc", "hellaswag", "mmlu", "truthful_qa", "winogrande", "gsm8k" ]