The Multilingual Translator leverages Hugging Face’s Helsinki-NLP/opus-mt models to translate text between multiple languages effortlessly. Built with a ReactJS (Vite) frontend and a Flask backend, this tool provides real-time translations through an interactive interface.
- Dynamic Language Support: Translate text between various language pairs using Hugging Face models.
- Real-Time Results: Translations are generated instantly for a seamless user experience.
- User-Friendly Interface: Built with ReactJS for responsive and intuitive interaction.
- Customizable: Open-source and extendable for specific needs or additional features.
- ReactJS with Vite for a fast and responsive UI.
- Axios for API communication.
- Flask for handling API requests and processing translations.
- Hugging Face’s Helsinki-NLP/opus-mt for accurate multilingual translation.
git clone [email protected]:allanninal/multilingual-translator.git
cd multilingual-translator
-
Create and activate a virtual environment:
python3.12 -m venv venv source venv/bin/activate # Linux/Mac venv\Scripts\activate # Windows
-
Install dependencies using
requirements.txt
from the backend folder:pip install -r backend/requirements.txt
-
Run the Flask backend:
python backend/app.py
-
Navigate to the
frontend
directory:cd frontend
-
Install dependencies:
npm install
-
Start the React development server:
npm run dev
Visit the app at http://localhost:5173
.
- Input Text: Enter the text and specify the source and target languages.
- Backend Processing: Flask processes the input and uses Hugging Face’s
Helsinki-NLP/opus-mt
models for translation. - Display Results: The frontend displays the translated text in real-time.
- Speech Integration: Add text-to-speech and speech-to-text capabilities for audio translations.
- Language Dropdowns: Replace text input fields with dropdown menus for easy language selection.
- Save Translations: Allow users to save translated text locally or in the cloud.
- Enhanced UI/UX: Add progress indicators and polished designs for better user experience.
- Offline Support: Enable limited offline translations by hosting specific language models locally.
This project is licensed under the MIT License. See the LICENSE
file for details.
If you find this project helpful, consider supporting me on Ko-fi:
ko-fi.com/allanninal
For more exciting projects, check out my list of AI Mini Projects:
Mini AI Projects GitHub List