YAML Metadata Warning:empty or missing yaml metadata in repo card

Check out the documentation for more information.

Neural Machine Translation (NMT) Application

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.

Table of Contents

Project Overview

This application is designed to:

  • Allow users to input text and select source and target languages.
  • Translate the text using a Neural Machine Translation model.
  • Display the translated text in real-time with a user-friendly interface.

The project is divided into two major parts:

  1. Frontend: A responsive web interface (using HTML, CSS, and JavaScript) for user interaction.
  2. Backend: A Flask API that handles translation requests and integrates the deep learning model.

Directory Structure

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.

Setup Instructions

1. Create and Activate a Virtual Environment

To avoid conflicts with system-wide packages, it's recommended to use a virtual environment.

For Windows

python -m venv venv
venv\Scripts\activate

For macOS/Linux

python3 -m venv venv
source venv/bin/activate

2. Install Dependencies

Once the virtual environment is activated, install the required dependencies:

pip install -r requirements.txt

Running the Application

1. Start the Flask Server

Run the following command from the src directory:

python src/app.py

2. Access the Application

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.

Backend Endpoints

Endpoint Method Description
/translate POST Accepts input text and returns translated text.

Testing

To run unit tests, execute:

pytest tests/

Future Enhancements

  • Improve model efficiency for faster response times.
  • Implement additional language pairs.
  • Deploy the application on a cloud platform (AWS, GCP, or Azure).
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support