Team Ai
Apppublic

Alignment-Lab-AI/orcaleaderboard

sourceHugging Faceapache-2.0updated 2y agoView on Hugging Face
0likes
formatting.py37 linesDownload Raw Back to display
1from huggingface_hub import HfApi2 3API = HfApi()4 5 6def model_hyperlink(link, model_name):7    return f'<a target="_blank" href="{link}" style="color: var(--link-text-color); text-decoration: underline;text-decoration-style: dotted;">{model_name}</a>'8 9 10def make_clickable_model(model_name):11    link = f"https://huggingface.co/{model_name}"12 13    details_model_name = model_name.replace("/", "__")14    details_link = f"https://huggingface.co/datasets/open-llm-leaderboard-old/details_{details_model_name}"15 16    return model_hyperlink(link, model_name) + "  " + model_hyperlink(details_link, "📑")17 18 19def styled_error(error):20    return f"<p style='color: red; font-size: 20px; text-align: center;'>{error}</p>"21 22 23def styled_warning(warn):24    return f"<p style='color: orange; font-size: 20px; text-align: center;'>{warn}</p>"25 26 27def styled_message(message):28    return f"<p style='color: green; font-size: 20px; text-align: center;'>{message}</p>"29 30 31def has_no_nan_values(df, columns):32    return df[columns].notna().all(axis=1)33 34 35def has_nan_values(df, columns):36    return df[columns].isna().any(axis=1)37