Downloads · 30 days
0
utkarsh1797/neural_machine_translation
neural_machine_translation is a machine learning model from utkarsh1797. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
This project implements a Neural Machine Translation system that provides real-time translation between Indian languages via a web-based interface. The system uses a transformer-based model and integrates both a front…
Downloads · 30 days
0
Access
Public
Updated Mar 18, 2025
Repo size
915 MB
Likes
0
Public
Click a slice to open those files.
.safetensors909 MB · 99%
From the Hugging Face model README
This project implements a Neural Machine Translation system that provides real-time translation between Indian languages via a web-based interface. The system uses a transformer-based model and integrates both a frontend (HTML, CSS, JavaScript) and a Flask backend.
This application is designed to:
The project is divided into two major parts:
The project is organized under the src folder as follows:
src/
├── app.py # Main Flask application with API endpoints.
├── config.py # Configuration settings (model names, paths, hyperparameters).
├── translation.py # Model loading and translation logic.
├── fine_tune.py # Script for fine-tuning the NMT model.
├── templates/
│ └── index.html # Frontend HTML file.
├── static/
│ ├── styles.css # CSS file for styling.
│ └── script.js # JavaScript file for frontend interactions.
├── tests/
│ └── test_app.py # Test files for unit and integration tests.
└── README.md # Project documentation.
To avoid conflicts with system-wide packages, it's recommended to use a virtual environment.
python -m venv venv
venv\Scripts\activate
python3 -m venv venv
source venv/bin/activate
Once the virtual environment is activated, install the required dependencies:
pip install -r requirements.txt
Run the following command from the src directory:
python src/app.py
Open your web browser and go to:
http://localhost:5000
This will load the user interface where you can input text and select languages for translation.
| Endpoint | Method | Description |
|---|---|---|
/translate | POST | Accepts input text and returns translated text. |
To run unit tests, execute:
pytest tests/