Spaces:
Build error
Build error
Download src/display/formatting.py from yanhhh/CapArena_Auto: direct link, hf CLI and curl.
- Browser
- Download file 922 Bytes
-
https://huggingface.co/spaces/yanhhh/CapArena_Auto/resolve/main/src/display/formatting.py
- Command line
-
hf download hf://spaces/yanhhh/CapArena_Auto/src/display/formatting.py
-
curl -L -o formatting.py https://huggingface.co/spaces/yanhhh/CapArena_Auto/resolve/main/src/display/formatting.py
922 Bytes
| def model_hyperlink(link, model_show): | |
| return f'<a target="_blank" href="{link}" style="color: var(--link-text-color); text-decoration: underline;text-decoration-style: dotted;">{model_show}</a>' | |
| def make_clickable_model(model_show , model_name , is_open): | |
| if is_open: | |
| link = f"https://huggingface.co/{model_name}" | |
| else: | |
| link = model_name | |
| return model_hyperlink(link, model_show) | |
| def styled_error(error): | |
| return f"<p style='color: red; font-size: 20px; text-align: center;'>{error}</p>" | |
| def styled_warning(warn): | |
| return f"<p style='color: orange; font-size: 20px; text-align: center;'>{warn}</p>" | |
| def styled_message(message): | |
| return f"<p style='color: green; font-size: 20px; text-align: center;'>{message}</p>" | |
| def has_no_nan_values(df, columns): | |
| return df[columns].notna().all(axis=1) | |
| def has_nan_values(df, columns): | |
| return df[columns].isna().any(axis=1) | |