--- title: MADLAD-400 Translate emoji: 🌍 colorFrom: blue colorTo: green sdk: gradio sdk_version: 6.17.3 app_file: app.py python_version: "3.12" pinned: false license: apache-2.0 short_description: Translate between 418 languages. --- # MADLAD-400 Translate Translate between 418 languages from Table 9 (Section A.1) of Google's [MADLAD-400](https://arxiv.org/pdf/2309.04662) 3B model. ## Requirements - [uv](https://docs.astral.sh/uv/) (Python package manager) - Python 3.12 - CUDA GPU (recommended) or CPU ## Setup ```bash uv venv --python 3.12 uv pip install -r requirements.txt uv pip install -r requirements-dev.txt # local runtime (gradio, spaces) + dev tools uv run app.py ``` The Gradio interface launches at `http://localhost:7860`. ## Tooling ```bash uv run ruff check . # lint uv run ruff format . # format uv run ty check # type check uv run pytest -m "not slow" # 51 fast tests uv run pytest # all 61 tests (slow require CUDA + model download) ```