This project demonstrates how to build an interactive English-to-Spanish translation app using a fine-tuned MarianMT model and the Streamlit framework.
- Description
- Features
- Installation
- Docker
- Usage
- Demo Video
- Model Details
- Evaluation
- Future Work
- License
This Streamlit app provides a simple yet effective interface for translating English text into Spanish. It leverages a state-of-the-art MarianMT model fine-tuned on a large parallel corpus of English-Spanish text. The app features a progress bar to indicate translation progress and handles potential errors gracefully.
- Real-time Translation: Translate English text to Spanish instantly.
- Progress Bar: Visual feedback during translation.
- Error Handling: Gracefully handles errors during translation.
- User-friendly Interface: Easy-to-use Streamlit interface.
- Clone the Repository:
git clone [https://github.com/WizKnight/English-to-Spanish-Translation-APP.git](https://github.com/WizKnight/English-to-Spanish-Translation-APP.git)
- Install Dependencies:
pip install -r requirements.txt
- Run Jupyter Notebook:
- Train the model using Torch cuda and save the model.
- Build Docker Image:
docker build -t english-to-spanish-translator .
- Run Docker Container:
docker run -p 8501:8501 english-to-spanish-translator
- Run the App:
streamlit run main.py
- Enter Text: Type or paste your English text into the text area.
- Click Translate: Press the "Translate" button to initiate translation.
- View Translation: The translated Spanish text will appear below.
- Architecture: MarianMT (Helsinki-NLP/opus-mt-en-es)
- Fine-tuning: The model has been fine-tuned on a large parallel corpus of English-Spanish text from the Hugging Face Datasets library.
- Framework: PyTorch and Transformers (Hugging Face)
- The model was evaluated using the BLEU (Bilingual Evaluation Understudy) score, achieving a score of 22.96 on a test dataset.
- Additional human evaluation was conducted to assess translation fluency and adequacy.
- Add support for batch translation.
- Integrate a download option for translated text.
- Explore other model architectures like T5.
- Incorporate user feedback for continuous improvement.
This project is licensed under the Apache 2.0 License.