A newer version of the Gradio SDK is available: 6.12.0
Deployment Guide β HuggingFace Space
Quick Deploy (3 steps)
Step 1: Create a new HuggingFace Space
- Go to huggingface.co/new-space
- Fill in:
- Owner:
PlotweaverAI(or your account) - Space name:
live-football-commentary-en-yo - SDK: Gradio
- Hardware: T4 small (GPU required β free tier CPU won't work well)
- Visibility: Public
- Owner:
- Click Create Space
Step 2: Upload the files
Upload these 3 files to the Space repo (via the web UI or git):
βββ README.md β Space metadata (hardware, tags, etc.)
βββ app.py β Main Gradio application
βββ requirements.txt β Python dependencies
Option A β Web upload:
- Go to your Space β Files β "Add file" β Upload each file
Option B β Git (recommended):
# Clone the space
git clone https://huggingface.co/spaces/PlotweaverAI/live-football-commentary-en-yo
cd live-football-commentary-en-yo
# Copy the files
cp /path/to/hf_space/* .
# Push
git add .
git commit -m "Initial deploy: ENβYO commentary pipeline"
git push
Step 3: Wait for build
The Space will automatically:
- Install dependencies from
requirements.txt - Download all 3 models from HuggingFace Hub
- Start the Gradio app
First build takes ~5-10 minutes (model downloads). Subsequent restarts are faster due to caching.
Hardware Notes
| Hardware | Cost | Performance |
|---|---|---|
| T4 small | ~$0.60/hr | Good β full pipeline in ~6-10s |
| T4 medium | ~$1.00/hr | Better for concurrent users |
| A10G small | ~$1.05/hr | Fastest inference |
| CPU basic | Free | Very slow (~60s+), not recommended |
The Space will sleep after 48 hours of inactivity on paid hardware. You can enable "persistent" mode in Space settings to keep it running.
Troubleshooting
Space keeps crashing / OOM:
- T4 small has 16GB VRAM β should be enough for all 3 models in float16
- If issues persist, try T4 medium
Models fail to load:
- Make sure all 3 model repos are public on HuggingFace
- If private, add a
HF_TOKENsecret in Space settings
Audio recording doesn't work:
- Browser mic access requires HTTPS (HuggingFace Spaces provides this)
- Make sure you've granted microphone permission in the browser
Customization
To add more source/target languages (your MT model supports 6):
Edit app.py and add a language dropdown to the Gradio UI.
Your NLLB model likely supports these codes:
eng_Latn(English)yor_Latn(Yoruba)ibo_Latn(Igbo)hau_Latn(Hausa)- Check your model card for the full list.