Spaces:
Running
Running
| TITLE = """<h1 align="center" id="space-title">AstaBench Leaderboard</h1>""" | |
| INTRODUCTION_TEXT = """ | |
| ## Introduction | |
| """ | |
| SUBMISSION_TEXT = """ | |
| ## Submissions | |
| """ | |
| CITATION_BUTTON_LABEL = "Copy the following snippet to cite these results" | |
| CITATION_BUTTON_TEXT = r"""@article{asta-bench, | |
| title={AstaBench}, | |
| author={AstaBench folks}, | |
| year={2025}, | |
| eprint={TBD.TBD}, | |
| archivePrefix={arXiv}, | |
| primaryClass={cs.AI}, | |
| secondaryClass={cs.CL} | |
| }""" | |
| def format_error(msg): | |
| return f"<p style='color: red; font-size: 20px; text-align: center;'>{msg}</p>" | |
| def format_warning(msg): | |
| return f"<p style='color: orange; font-size: 20px; text-align: center;'>{msg}</p>" | |
| def format_log(msg): | |
| return f"<p style='color: green; font-size: 20px; text-align: center;'>{msg}</p>" | |
| def hyperlink(link, text): | |
| return f'<a target="_blank" href="{link}" style="color: var(--link-text-color); text-decoration: underline;text-decoration-style: dotted;">{text}</a>' | |
| def hf_uri_to_web_url(uri: str) -> str: | |
| """ | |
| Convert a Hugging Face-style URI like: | |
| hf://datasets/{namespace}/{repo}/{path...} | |
| into a public web URL: | |
| https://huggingface.co/datasets/{namespace}/{repo}/tree/main/{path...} | |
| """ | |
| prefix = "hf://datasets/" | |
| if not uri.startswith(prefix): | |
| raise ValueError("URI must start with 'hf://datasets/'") | |
| parts = uri[len(prefix) :].split("/", 2) | |
| if len(parts) < 3: | |
| raise ValueError("Expected format: hf://datasets/{namespace}/{repo}/{path...}") | |
| namespace, repo, path = parts | |
| return f"https://huggingface.co/datasets/{namespace}/{repo}/tree/main/{path}" | |