Skip to content

srinidhi-2006-bit/AI-Powered-Multi-Language-Translator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🌍 AI-Powered-Multi-Language-Translator

AI-Powered-Multi-Language-Translator is a web-based multilingual translation application built using Streamlit and Google Gemini AI. It allows users to translate text between multiple languages with clean, strict outputs and accurate name transliteration.


🚀 Features

  • 🌐 Translate text between multiple languages
  • ✍️ Strict translation output (only target language, no explanations)
  • 👤 Correct name transliteration (English → Hindi / Telugu / others)
  • ⚡ Powered by Google Gemini Flash model
  • 🛡️ Quota-safe using caching
  • ❌ No unwanted English / Roman text in output
  • 🎨 Clean and simple Streamlit UI

🛠️ Tech Stack

Layer Technology
Frontend Streamlit
AI Model Google Gemini (gemini-flash-latest)
Backend Python
SDK google-genai
Styling Streamlit Theme (config.toml)

📁 Project Structure

AI-Powered-Multi-Language-Translator/
│
├── app.py
├── requirements.txt
├── README.md
└── .streamlit/
    └── config.toml

🔑 Prerequisites


⚙️ Installation & Setup

1️⃣ Clone the Repository

git clone https://github.com/srinidhi-2006-bit/AI-Powered-Multi-Language-Translator.git
cd AI-Powered-Multi-Language-Translator

2️⃣ Create Virtual Environment (Recommended)

python -m venv venv

Activate:

Windows

venv\Scripts\activate

Mac / Linux

source venv/bin/activate

3️⃣ Install Dependencies

pip install -r requirements.txt

4️⃣ Add Environment Variables

Create a .env file in the project root:

GEMINI_API_KEY=your_api_key_here

5️⃣ (Optional) Streamlit Theme

.streamlit/config.toml

[theme]
primaryColor = "#4F46E5"
backgroundColor = "#EEF2FF"
secondaryBackgroundColor = "#EEF2FF"
textColor = "#1F2937"
font = "sans serif"

▶️ Run the Application

streamlit run app.py

Open in browser:

http://localhost:8501

🧪 Example Usage

Input

srinidhi

Output (English → Hindi)

श्रीनिधि

Output (English → Telugu)

శ్రీనిధి

✔ Only target language ✔ No explanations ✔ No Roman letters


🧠 How It Works

  • Uses Gemini Flash model for free-tier compatibility
  • Enforces strict prompt rules for clean output
  • Uses Streamlit caching to reduce API usage
  • Gracefully handles 429 quota errors

⚠️ API Quota Note

Google Gemini free tier has limited daily requests.

Tips:

  • Avoid frequent page refreshes
  • Cached translations do not consume extra quota
  • If limit is reached, wait and retry later

🏆 Use Cases

  • Multilingual text translation
  • Indian language name transliteration
  • Academic & hackathon projects
  • AI project for resume / portfolio

🔮 Future Enhancements

  • 🔄 Auto language detection
  • 🎤 Voice translation
  • 📋 Copy translated text
  • 🌙 Dark / Light mode toggle
  • 🌐 Cloud deployment

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages