from pathlib import Path
# Directory where request by models are stored
DIR_OUTPUT_REQUESTS = Path("requested_models")
EVAL_REQUESTS_PATH = Path("eval_requests")
##########################
# Text definitions #
##########################
banner_url = "https://huggingface.co/datasets/vargha/persian_asr_leaderboard/resolve/main/banner.png"
BANNER = f'
'
INTRODUCTION_TEXT = "📐 The 🤗 Persian ASR Leaderboard ranks and evaluates speech recognition models \
on the Hugging Face Hub using the Persian Common Voice dataset. \
\nWe report the [WER](https://huggingface.co/spaces/evaluate-metric/wer) and [CER](https://huggingface.co/spaces/evaluate-metric/cer) metrics (⬇️ lower the better). Models are ranked based on their WER, from lowest to highest. Check the 📈 Metrics tab to understand how the models are evaluated. \
\nIf you want results for a model that is not listed here, you can submit a request for it to be included ✉️✨."
CITATION_TEXT = """@misc{persian-asr-leaderboard,
title = {Persian Automatic Speech Recognition Leaderboard},
author = {Your Name},
year = 2024,
publisher = {Hugging Face},
howpublished = "\\url{https://huggingface.co/spaces/your-username/persian_asr_leaderboard}"
}
"""
METRICS_TAB_TEXT = """
# Metrics and Dataset
## Metrics
We evaluate models using the Word Error Rate (WER) and Character Error Rate (CER) metrics. Both metrics are used to measure the accuracy of automatic speech recognition systems.
- **Word Error Rate (WER)**: Calculates the percentage of words that were incorrectly predicted. A lower WER indicates better performance.
- **Character Error Rate (CER)**: Similar to WER but operates at the character level, which can be more informative for languages with rich morphology like Persian.
## Dataset
We use the [Persian Common Voice](https://huggingface.co/datasets/mozilla-foundation/common_voice_17_0) dataset for evaluation. The dataset consists of diverse speech recordings from various speakers, making it a good benchmark for Persian ASR models.
## How to Submit Your Model
To submit your model for evaluation, go to the "✉️✨ Request a model here!" tab and enter your model's name in the format `username/model_name`. Your model should be hosted on the Hugging Face Hub.
"""