Skip to content

English to French and English to German Machine Translation using Transformers

Notifications You must be signed in to change notification settings

Nazneenp/language_translation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Language Translation Web App

This Flask web application allows users to translate English sentences to French and German using Hugging Face's Transformers library. It provides a simple user interface for language translation.

Features

This Flask web application allows users to translate English sentences to French and Spanish. It provides a user-friendly interface where users can input a sentence, select a target language, and click "Translate" to view the translation result on a new page.

Requirements

Make sure you have the following libraries installed:

  • Flask
  • Transformers
  • Torch
  • SentencePiece

Setting Up a Virtual Environment

It's recommended to create a virtual environment to isolate your project's dependencies. You can use the following steps to set up a virtual environment:

  1. Navigate to your project directory: cd /path/to/your/project

  2. Create a virtual environment (replace myenv with your preferred environment name):

python -m venv myenv
  1. Activate the virtual environment:

On Windows:

myenv\Scripts\activate

On macOS and Linux:

source myenv/bin/activate
  1. Install the required libraries within the virtual environment:
pip install Flask transformers torch sentencepiece

Customizing Translations

You can extend this project to support additional languages by adding new translation models and updating the HTML form to include the new languages.

Acknowledgments

This project uses the Hugging Face Transformers library for natural language processing.

License

This project is open-source and available under the MIT License.

Happy translating!

About

English to French and English to German Machine Translation using Transformers

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published