File size: 855 Bytes
701dbf1
6536f1c
ce82694
1900a95
6536f1c
701dbf1
177f899
701dbf1
 
 
ccb20f8
701dbf1
 
177f899
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
---
title: MADLAD-400 Translation
emoji: 🌍
colorFrom: blue
colorTo: green
sdk: gradio
sdk_version: 6.8.0
app_file: app.py
pinned: false
license: apache-2.0
short_description: Translate English text to (almost) 400 languages.
---

# MADLAD-400 Translation

Translate English text to nearly 400 languages using Google's [MADLAD-400](https://arxiv.org/pdf/2309.04662) 3B model.

## Requirements

- Python 3.12
- MPS (Apple Silicon) or CUDA GPU

## Setup

```bash
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
python app.py
```

The Gradio interface launches at `http://localhost:7860`.

## Tooling

```bash
ruff check .             # lint
ruff format .            # format
ty check                 # type check
pytest -m "not slow"     # fast tests
pytest                   # all tests (requires GPU + model download)
```