/arsath-eng-Gemma-model-En-Ta

A lightweight and efficient English to Tamil translation model implementation using Google's Gemma 2b. This project aims to bridge language barriers while maintaining cultural nuances and context.

Primary LanguagePython

🌏 English to Tamil Translator App

Tamil Translator Banner

πŸ“ Description

A powerful Streamlit-based application that provides English to Tamil translation with two specialized modes: normal translation and contextual translation. Built using the Groq API and Llama 3.2 model for accurate translations.

App Demo

✨ Features

  • πŸ”„ Two Translation Modes:
    • πŸ“ Normal Translation
    • 🧠 Contextual Translation with domain awareness
  • πŸ“š Multiple Domain Support:
    • Technical
    • Medical
    • Legal
    • Literary
    • Business
    • Academic
  • ♾️ Unlimited Text Length Support
  • πŸ“œ Translation History
  • πŸ’Ύ Export Options with Metadata
  • 🎯 Progress Tracking

πŸ–₯️ Screenshots

Normal Translation Mode

Normal Translation

Translation History

Translation History

πŸš€ Getting Started

Prerequisites

  • Python 3.8 or higher
  • Groq API key
  • Git

Installation

  1. Clone the repository
git clone https://github.com/YOUR_USERNAME/tamil-translator.git
cd tamil-translator
  1. Create and activate virtual environment
# Windows
python -m venv venv
venv\Scripts\activate

# Linux/Mac
python -m venv venv
source venv/bin/activate
  1. Install dependencies
pip install -r requirements.txt
  1. Set up environment variables Create a .env file in the project root:
GROQ_API_KEY=your_groq_api_key_here
  1. Run the application
streamlit run translator2.py

πŸ’» Usage

  1. Select translation mode (Normal/Contextual)
  2. Choose domain (for contextual translation)
  3. Enter English text
  4. Click "Translate"
  5. Download or copy the translation

πŸ› οΈ Technical Architecture

graph TD
    A[User Input] --> B[Translation Manager]
    B --> C{Translation Mode}
    C -->|Normal| D[Direct Translation]
    C -->|Contextual| E[Domain-Specific Translation]
    D --> F[Output]
    E --> F
    F --> G[History/Export]
Loading

πŸ“± Application Structure

tamil-translator/
β”œβ”€β”€ translator2.py        # Main application file
β”œβ”€β”€ .env                 # Environment variables
β”œβ”€β”€ requirements.txt     # Dependencies
β”œβ”€β”€ README.md           # Documentation
└── screenshots/        # Application screenshots
    β”œβ”€β”€ banner.png
    β”œβ”€β”€ main-interface.png
    β”œβ”€β”€ normal-translation.png
    β”œβ”€β”€ contextual-translation.png
    β”œβ”€β”€ history.png
    └── usage-guide.png

🀝 Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ™ Acknowledgments

  • Groq API for providing the translation capabilities
  • Streamlit for the web interface framework
  • Gemma2 model for accurate translations