Spaces:
Sleeping
Sleeping
A newer version of the Gradio SDK is available:
5.13.1
Development
Design Decisions
We specifically opt for a single-space leaderboard for simplicity. We solve the issue of keeping the gradio UI interactive while models are evaluating by using background tasks instead of a separate space.
Setup
Prerequisites
- Python 3.10
- Git
- A love for speech recognition! π€
Quick Installation
- Clone this repository:
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/spaces/KoelLabs/IPA-Transcription-EN
cd IPA-Transcription-EN
- Set up your environment and download data:
. ./scripts/install.sh
- Launch the leaderboard in development mode (auto-reloads on code changes):
. ./scripts/run-dev.sh
- Visit
http://localhost:7860
in your browser and see the magic! β¨
Adding/Removing Dependencies
- Activate the virtual environment with
. ./venv/bin/activate
- Add the dependency to
requirements.txt
(or remove it) - Make sure you have no unused dependencies with
pipx run deptry .
- Run
pip install -r requirements.txt
- Freeze the dependencies with
pip freeze > requirements_lock.txt
Run without reloading
. ./scripts/run-prod.sh
File Structure
The two most imporant files are app/app.py
for the main gradio UI and app/tasks.py
for the background tasks that evaluate models.
IPA-Transcription-EN/
βββ README.md # General information about the leaderboard
βββ CONTRIBUTING.md # Contribution guidelines
βββ DEVELOPMENT.md # Development setup and design decisions
βββ requirements.txt # Python dependencies
βββ requirements_lock.txt # Locked dependencies
βββ scripts # Helper scripts
β βββ install.sh # Install dependencies and download data
β βββ run-dev.sh # Run the leaderboard in development mode
βββ venv # Virtual environment
βββ app/ # All application code lives here
β βββ data/ # Phoneme transcription datasets
β βββ queue/ # Stores leaderboard state and task status
β | βββ tasks.json # Task queue
β | βββ results.json # Detailed evaluation results
β | βββ leaderboard.json # Compact results for leaderboard display
β βββ app.py # Main Gradio UI
β βββ tasks.py # Background tasks for model evaluation
β βββ data.py # Data loading and processing
β βββ inference.py # Model inference
β βββ phone_metrics.py # Evaluation metrics
βββ img/ # Images for README and other documentation