File size: 1,137 Bytes
ae95fcb
 
 
 
 
 
 
 
 
 
c58dd22
ae95fcb
 
f871be9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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: DocumentTranslator
emoji: 🐠
colorFrom: pink
colorTo: red
sdk: gradio
sdk_version: 6.2.0
app_file: app.py
pinned: false
license: agpl-3.0
short_description: Translate Word .doxc, and .pptx, preserving layout
---

# Document Translator

Translate Word documents while preserving formatting, footnotes, and styling.

## Features

- **Multiple Backends**: NLLB, Madlad-400, Opus-MT, WMT21
- **Format Preservation**: Maintains e.g. bold, italic, fonts, spacing
- **Footnote Support**: Handles documents with citations
- **Fast Processing**: Optimized with CTranslate2, works reasonably well on CPU

## Usage

1. Upload a .docx file
2. Select source and target languages
3. Choose translation settings
4. Click "Translate Document"
5. Download the translated file

## Configuration

For optional (experimental) LLM modes, clone this Space and try with setting environment variables in Space settings:
- `OPENAI_API_KEY` - For OpenAI GPT models
- `ANTHROPIC_API_KEY` - For Claude models

## Limitations for now

- CPU-based processing (no GPU on free tier)
- NLLB 600M recommended for RAM constraints
- Large documents may timeout