This challenge involves deploying our English-to-French translation model using two different methods: Flask with Docker and Gradio. Below are step-by-step instructions for each approach.
git clone (https://github.com/RamezCh/flask_machine_translation_eng_fr.git)
cd flask_machine_translation_eng_frdocker build -t translation-app .
docker run -p 5000:5000 translation-appOnce the container is running, send a POST request to test the translation:
- URL:
http://localhost:5000 - Method:
POST - Headers:
Content-Type: application/json - Body (JSON):
{ "text": "She is driving a truck." } - Response:
{ "translated_text": "Elle conduit un camion." }
Go to http://127.0.0.1:5000/
Type what you want to translate
Hit Translate
You now have your French translation!
Click here to open the Google Colab notebook
- No need for Flask or Docker
- Provides an interactive UI for testing translations
- Generates a public link for easy sharing