Transparent and Adaptable Low-resource Machine Translation, through LLM post-editing
# Tulun
Transparent and Adaptable Low-resource Machine Translation, through LLM post-editing
🎥 Demo video | 🖥️ Live demo (using Bislama) | 📄 Paper
## Local installation
1. Install Python dependencies:
```bash
python -m venv .venv
source .venv/bin/activate
pip install poetry
poetry install
```
2. Setup credentials: create a .env file in the root directory and add the following:
```bash
# for Google Translate (optional)
GOOGLE_APPLICATION_CREDENTIALS=' .json'
# for Gemini, can also use OpenAI / Anthropic / others, see
docs.litellm.ai
GEMINI_API_KEY=' '
```
3. Run the server:
```bash
./manage.py migrate && ./manage.py runserver
```
You can now configure your install (target lang, import glossary, etc.) at
localhost. After that, you can access the translation interface at
localhost.
## Deployment
1. Install Docker and Docker Compose
2. Setup credentials: create a prod.env file in the root directory and add credentials, similar to example above.
3. Run the server:
```bash
docker-compose up -d
```
Access your server at
localhost. Can be deployed behind a reverse proxy like Nginx.
## Evaluation
For evaluations in the paper: see the eval folder README.
For the in-app eval mode, upload your evaluation set at `/admin/translations/evalrow/`. Upon entering a sentence that is part of the eval set, the app will automatically switch to eval mode.