Skip to content

This is a multilingual translation web app built with Streamlit and a pretrained Helsinki-NLP model from Hugging Face. The app allows users to input text in any language and automatically translates it to English.

Notifications You must be signed in to change notification settings

Vijay6383/AI-Multilingual-Translater

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

AI Multilingual Translator to English

Description

This is a multilingual translation web app built with Streamlit and a pretrained Helsinki-NLP model from Hugging Face. The app allows users to input text in any language and automatically translates it to English.

The app leverages the Helsinki-NLP translation models, which are available in the Hugging Face model hub, offering state-of-the-art performance for machine translation tasks. Whether you're dealing with French, Spanish, German, Chinese, or any other language, this app can quickly translate the text into English.

Features

  • Automatic Language Detection: The app detects the language of the input text and translates it into English.
  • Supports Multiple Languages: You can input text in multiple languages, and the app will automatically translate to English.
  • Simple Interface: The app is built using Streamlit, which offers a clean and simple interface for easy interaction.
  • Pretrained Model: Utilizes the Helsinki-NLP multilingual model from Hugging Face for accurate translations.

Tech Stack

  • Backend: Python
  • Libraries:
    • Streamlit for building the web app.
    • Transformers for integrating the Helsinki-NLP translation model.
    • Torch for running the deep learning models.
  • Model: Helsinki-NLP's pretrained multilingual translation model from Hugging Face.

Installation

To run this app locally, follow these steps:

1. Clone the repository

git clone [https://github.com/your-username/multilingual-translator](https://github.com/Vijay6383/AI-Multilingual-Translater.git)
cd multilingual-translator

2. Set up a virtual environment (optional but recommended

python -m venv venv
venv\Scripts\activate 

3. Install dependencies

pip install -r requirements.txt

4. Run the Streamlit app

streamlit run main.py

This will start a local development server and open the app in your web browser.

Usage

  1. Input: Enter the text in any language in the provided text box.
  2. Translation: The app will automatically detect the language and translate the text into English.
  3. Result: The translated text will appear in the output box below.

Example

  • Input: "Hola, ¿cómo estás?"
  • Output: "Hello, how are you?"

Hugging Face Model

This app uses the pretrained Helsinki-NLP translation model available on Hugging Face. Specifically, the opus-mt models are used for multilingual translation tasks. You can find more information about the model on Hugging Face's Helsinki-NLP Model Page.

Future Improvements

  • Multiple Language Support: Support for translating between other languages, not just to English.
  • Customizable Interface: Allow users to select the target language.
  • Optimized Performance: Use faster models or deploy the app on a cloud platform for better scalability.

Contributing

I welcome contributions! If you'd like to improve the app, feel free to fork the repository and create a pull request. Please ensure that your contributions adhere to the code style and include appropriate tests if necessary.

linkedin

About

This is a multilingual translation web app built with Streamlit and a pretrained Helsinki-NLP model from Hugging Face. The app allows users to input text in any language and automatically translates it to English.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages