Skip to content

A containerized flask server which uses the HuggingFace Transformers library to provide a machine translation endpoint.

Notifications You must be signed in to change notification settings

parkernilson/machine-translation-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Translation Server

This is an example of a containerized Flask server which performs machine translation using the HuggingFace Transformers library.

How does it work?

This project uses a python library called transformers to perform translation from English to German using a pretrained T5 Model from HuggingFace.

The web server is written in a python framework called Flask and served using GUnicorn.

All of this is done within a simple Docker container.

Why Docker?

Docker is an incredibly useful tool for creating "containerized" applications. These applications can be run anywhere in a highly consistent and predictable environment. This means that I can run the exact same code in my development environment (my laptop) as in my production environment (the server where it will be hosted), and know that it will work as expected.

Docker also provides a tool called Docker Compose which allows for creating groups of containers (with their own isolated environments, frameworks, languages, networking, etc.) where each container has one specific purpose, and then they can be built, deployed, and networked together magically. And I'm not talking about confusing, hard-to-understand, poorly documented magic. I'm talking about a silky smooth, simple, declarative docker-compose.yml file

TLDR;

Docker let's me use the right tool/language/framework for the job every time, without worrying about complicated deployments.

About

A containerized flask server which uses the HuggingFace Transformers library to provide a machine translation endpoint.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published