Spaces:
Running
Running
# 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 | |
1. Clone this repository: | |
```bash | |
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/spaces/KoelLabs/IPA-Transcription-EN | |
cd IPA-Transcription-EN | |
``` | |
2. Set up your environment and download data: | |
```bash | |
. ./scripts/install.sh | |
``` | |
3. Launch the leaderboard in development mode (auto-reloads on code changes): | |
```bash | |
. ./scripts/run-dev.sh | |
``` | |
4. Visit `http://localhost:7860` in your browser and see the magic! β¨ | |
## Adding/Removing Dependencies | |
0. Activate the virtual environment with `. ./venv/bin/activate` | |
1. Add the dependency to `requirements.txt` (or remove it) | |
2. Make sure you have no unused dependencies with `pipx run deptry .` | |
3. Run `pip install -r requirements.txt` | |
4. Freeze the dependencies with `pip freeze > requirements_lock.txt` | |
## Run without reloading | |
```bash | |
. ./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 | |
``` | |