This is a Gradio-based graphical interface for the BabelDOC project, designed to provide a more user-friendly and convenient local PDF translation experience.
Supported model sources:
- 🌐 OpenAI (GPT-3.5 / GPT-4 / GPT-4o, etc.)
- 🔍 DeepSeek
- 🖥️ Local Ollama models (e.g., Qwen, Gemma, LLaMA3, etc.)
- 📤 Upload a PDF file and automatically translate
- 🔄 Freely switch between model sources (OpenAI / DeepSeek / Ollama)
- 📌 Customize API base URL and model name
- 📗 Support bilingual/monolingual output, watermark removal
- ⚙️ Configurable options: minimum text length, compatibility enhancements
- 🧩 Decoupled from BabelDOC core, can be used independently
git clone https://github.com/chaorenai/babeldoc-ui.git
cd babeldoc-uiIt is recommended to use a virtual environment such as conda or venv:
# Create virtual environment (optional)
python -m venv venv
venv\Scripts\activate # On Windows
# Install dependencies
pip install -r requirements.txtpython app.pyYour browser will automatically open: http://127.0.0.1:7860
This UI depends on the BabelDOC CLI tool to perform actual translation. You can install it via either of the following ways:
uv tool install --python 3.12 BabelDOCgit clone https://github.com/funstory-ai/BabelDOC
cd BabelDOC
pip install -e .After installation, you can run babeldoc directly in your terminal.
-
When using local models (Ollama), make sure they are already running:
ollama run qwen:7b
-
If you don’t have an OpenAI API key, consider registering at DeepSeek or other OneAPI providers.
-
If the translated PDF becomes too large, disable bilingual output or try adjusting
--min-text-length.
This project is open-sourced under the MIT License. Feel free to fork and customize.
For technical issues or feature requests, please submit an Issue or contact the author:
Author: xiaodu
Email: chaoren@duck.com
X (formerly Twitter): https://x.com/xiaodus
⚠️ This project only provides a UI layer; the core translation logic belongs to the official BabelDOC project.




