Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Translation API

A FastAPI-based translation service that translates English text to Vietnamese using the MarianMT model.

Features

  • English to Vietnamese translation
  • RESTful API endpoints
  • Docker containerization
  • Automatic model downloading and caching

Setup

  1. Clone the repository
  2. Install dependencies:
    pip install -r requirements.txt

Running the Application

Local Development

uvicorn app.api:app --reload

Using Docker

docker build -t translation-api .
docker run -p 8000:8000 translation-api

API Endpoints

POST /translate

Translates English text to Vietnamese.

Request body:

{
    "text": "Hello, how are you?"
}

Response:

{
    "translated_text": "Xin chào, bạn khỏe không?"
}

GET /health

Health check endpoint.

Response:

{
    "status": "healthy"
}

API Documentation

Once the application is running, you can access the API documentation at:

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages