Spaces:
Running
Running
import pandas as pd | |
import gradio as gr | |
from utils import load_leaderboard | |
import numpy as np | |
from huggingface_hub import snapshot_download | |
def make_clickable(url, name): | |
return f'<a href="{url}" target="_blank">{name}</a>' | |
def render_info_html(): | |
info_text = """ | |
The Iqra’Eval challenge provides a shared, transparent platform to benchmark sequence‐prediction systems on our open testset (“IqraEval/open_testset”). | |
To participate, please: | |
1. Use the IqraEval open testset “IqraEval/open_testset” | |
2. Package your predictions in a CSV file with exactly two columns, **ID** and **Labels** | |
3. Send your CSV along with your **teamName_submission.csv** to **[email protected]** | |
4. Each team may submit up to 2 times per day. Only the best results from each team will be displayed on the leaderboard. | |
Once we receive your file, your system will be automatically evaluated and placed on the public leaderboard. Check out the **Metrics** tab to see how scores are computed, and the **Leaderboard** tab for current rankings. | |
If your model doesn’t appear, use the “Submit a request” link under the **Submit** tab. Good luck, and we look forward to seeing your results! | |
""" | |
# HTML formatted info text | |
return gr.Markdown(info_text) | |
def highlight_max(s, props=''): | |
return np.where(s == np.nanmax(s.values), props, '') | |
def render_leader_board(leaderboard_df): | |
if not leaderboard_df.empty: | |
print(leaderboard_df.shape) | |
leaderboard_df = leaderboard_df.sort_values(by="F1-score", ascending=False).reset_index(drop=True) | |
# Assign rank emojis 🥇🥈🥉 | |
emojis = ["🥇", "🥈", "🥉"] | |
leaderboard_df.loc[0, "System"] = f"{emojis[0]} {leaderboard_df.System[0]}" | |
leaderboard_df.loc[1, "System"] = f"{emojis[1]} {leaderboard_df.System[1]}" | |
leaderboard_df.loc[2, "System"] = f"{emojis[2]} {leaderboard_df.System[2]}" | |
styler = ( | |
leaderboard_df | |
.style \ | |
.format(precision=2) | |
.apply(highlight_max, props='color:green', axis=0) | |
) | |
return gr.Dataframe(styler, datatype=['markdown'] * 2 + ['number'] * 16, elem_id="leaderboard-table") | |
return gr.HTML(value="<p>No data available in the leaderboard.</p>") | |
def render_citation(): | |
return gr.Markdown(r""" | |
If you use Iqra'Eval in your work, it can be cited as: | |
```bibtex | |
@misc{kheir2025unifiedbenchmarkarabicpronunciation, | |
title={Towards a Unified Benchmark for Arabic Pronunciation Assessment: Quranic Recitation as Case Study}, | |
author={Yassine El Kheir and Omnia Ibrahim and Amit Meghanani and Nada Almarwani and Hawau Olamide Toyin and Sadeen Alharbi and Modar Alfadly and Lamya Alkanhal and Ibrahim Selim and Shehab Elbatal and Salima Mdhaffar and Thomas Hain and Yasser Hifny and Mostafa Shahin and Ahmed Ali}, | |
year={2025}, | |
eprint={2506.07722}, | |
archivePrefix={arXiv}, | |
primaryClass={cs.SD}, | |
url={https://arxiv.org/abs/2506.07722}, | |
} | |
```""") |