Skip to content

Latest commit

 

History

History
240 lines (155 loc) · 6.49 KB

File metadata and controls

240 lines (155 loc) · 6.49 KB

🎉 DocTranslator Pro is now live! Welcome to experience its enhanced capabilities!

✨ Key Advantages of the Pro Version

  • Intelligent Chunking Strategy: Better recognizes structures such as paragraphs and lists, avoiding breaks mid-sentence or within table rows, thereby improving translation quality and contextual coherence.
  • Cost Optimization: Significantly reduces token consumption through more efficient prompt design and injection strategies, effectively lowering translation costs.
  • Termbase Support: Allows users to define custom terminology glossaries to ensure accuracy and consistency in translating specialized terms.
  • Translation Memory: Intelligently reuses previous translations to boost efficiency and reduce costs.
  • AI Model Provider Management: Supports configuration of multiple large language models including OpenAI, Qwen, and DeepSeek, enabling users to select based on their needs or let the system intelligently route requests.
  • Batch Processing: Enables uploading documents and selecting multiple termbases and translation memories for concurrent translation, achieving higher efficiency and accuracy.
  • Usage Analytics: Provides management dashboard features such as token consumption statistics.

Pro version online experience


📄 DocTranslator - Document AI Translation Tool 🚀

DocTranslator is a powerful document AI translation tool that supports translation of multiple file formats, is compatible with OpenAI format APIs, and supports batch operations and multi-threading. Whether you're an individual user or a corporate team, DocTranslator can help you efficiently complete document translation tasks! ✨


[中文]


🌟 Features

  • Supports Multiple Document Formats
    📑 txt, 📝 markdown, 📄 word, 📊 csv, 📈 excel, 📑 pdf(Non scanned version), 📽️ ppt AI translation.

  • Compatible with OpenAI Format APIs
    🤖 Supports any endpoint API (proxy API) that conforms to the OpenAI format, flexibly adapting to various AI models.

  • Batch Operations
    🚀 Supports batch upload and translation of documents, improving work efficiency.

  • Multi-threading Support
    ⚡ Utilizes multi-threading technology to accelerate document translation.

  • Docker Deployment
    🐳 Supports one-click Docker deployment for simplicity and ease of use.


🛠️ Tech Stack

  • Frontend: Vue 3 + Vite
  • Backend: Python + Flask + MySQL/SQLite
  • AI Translation: Compatible with OpenAI format APIs
  • Deployment: Docker + Nginx

Demo Preview

Frontend Demo

Frontend Page
Frontend Page 2

Backend Demo

Backend Page
Backend Page 2

🚀 Local Development

1. Clone the Project

git clone https://github.com/mingchen666/DocTranslator.git
cd DocTranslator

2. Configure Environment Variables

Fill in the necessary environment variables in the backend/.env file.

3. Start the Backend

Navigate to the backend directory and install dependencies:

cd backend
pip install -r requirements.txt

4. Run the Backend

python app.py

5. Start the Frontend and Admin Panel

The /dist folder is already built and ready for deployment. If not developing locally, you can skip the following steps.

Frontend

cd frontend
pnpm install
pnpm dev

Admin Panel

cd admin
pnpm install
pnpm dev

6. Access the Project


🐳 Docker Deployment

1. Project Structure

DocTranslator/
├── frontend/          # Frontend code
├── admin/             # Admin panel code
├── backend/           # Backend code
├── nginx/             # Nginx configuration
│   └── nginx.conf     # Nginx configuration file

2. Create Docker Network

docker network create my-network

3. Backend Deployment

3.1 Configure Environment Variables

Ensure the DocTranslator/backend/.env file is correctly filled with environment variables.

3.2 Build Backend Image

cd DocTranslator/backend
docker build -t ezwork-api .

3.3 Run Backend Container

cd ..
docker run -d \
  --name backend-container \
  --network my-network \
  -p 5000:5000 \
  -v $(pwd)/backend/db:/app/db \
  ezwork-api

4. Start Nginx

docker run -d \
  --name nginx-container \
  -p 1475:80 \
  -p 8081:8081 \
  -v $(pwd)/nginx/nginx.conf:/etc/nginx/conf.d/default.conf \
  -v $(pwd)/frontend/dist:/usr/share/nginx/html/frontend \
  -v $(pwd)/admin/dist:/usr/share/nginx/html/admin \
  --network my-network \
  nginx:stable-alpine

5. Access Services


💖 Support

If DocTranslator has been helpful to you, consider supporting the project! Your support keeps me motivated to continue developing! 😊
🎉 Support Code:
Support Code

📢 Join Our Community

If you have any questions or would like to discuss, feel free to join our QQ group!
QQ Group

📝 User Guide

  1. Upload Documents: Select the documents you want to translate on the frontend page and upload them.
  2. Select Translation Language: Set the target language and start the translation.
  3. View Results: Download the translated documents once the translation is complete.

🤝 Contribution Guide

We welcome contributions!


📜 License

Apache-2.0 license.


📞 Contact Me

For any questions or suggestions, feel free to reach out:


📌 Note

This project is a refactored and optimized version based on ezwork. Thanks to the original author for their contribution! 🙏

🙏 Thanks

BabelDOC

Star History