This service was developed to translate documents without breaking their structure. Below is an overview of the service architecture.
- Translation API Service: A dedicated API service for translating documents.
- Telegram Bot: A chatbot interface for document translation via Telegram.
- Ukrainian
- German
- English
- Helsinki-NLP/opus-mt: A collection of translation models for many language pairs.
- facebook/hf-seamless-m4t-medium: A multilingual and multitask model for translation, transcription, and text generation.
- Cohere LLM (Command R+): A large language model for a variety of NLP tasks.
- Deployed Mistral-Nemo-Instruct-2407: A model deployed for specific translation and instruction-based tasks.
To run the entire service, including both the translation API and the Telegram bot:
docker-compose up --build
If you want to build and run only the Translation API service:
docker-compose up --build translator_backend
After starting the Translation API, it will be available at http://localhost:8000. You can interact with the API via HTTP requests. Here’s an example of how to translate a document:
curl -X POST "http://localhost:8000/translate_document?src_lang=ukrainian&tgt_lang=english&output_format=docx" \
-H "accept: application/json" \
-H "Content-Type: multipart/form-data" \
-F "file=@/path/to/your/document.docx"
** Replace /path/to/your/document.docx with the path to the document you want to translate.
Ensure you have the following installed on your local machine:
- Docker
- Docker Compose
This project is licensed under the MIT License - see the LICENSE file for details.