An AI-powered education app that explains any topic in your local language using regional dialect, tone, and real-life examples from your daily context. Powered by Google Gemini AI.
- 🌙 Dark Theme UI: Modern black background with white text for better readability
- 11 Indian Languages: Hindi, Tamil, Telugu, Bengali, Marathi, Gujarati, Kannada, Malayalam, Punjabi, Urdu, English
- Dialect-Aware Explanations: Uses regional slang and local context naturally (NOT just translation)
- Real-Life Examples: Contextual examples from cricket, farming, local transport, festivals, daily life
- Simplification Button: "Make Even Simpler" for ultra-simple 5-6 sentence explanations
- 🔊 Automatic Audio: Audio is generated automatically when explanation appears (uses Google TTS with rate limits)
- Image Upload: Upload textbook photos (OCR optional - just type the topic)
- Text-to-Speech: Audio playback in selected language/accent
- AI-Powered: Uses Google ADK agent architecture with Gemini for intelligent, context-aware explanations
LocalLearn doesn't just translate - it adapts the teaching style:
❌ Bad (Translation): "Newton का पहला नियम कहता है कि एक वस्तु गति में बनी रहेगी..."
✅ Good (LocalLearn): "अरे भाई, जब तू बस में खड़ा है ना और driver अचानक brake मारता है, तो तू आगे की तरफ झुक जाता है ना? बस यही है Newton का पहला नियम!..."
- Python 3.8+
- Google AI API Key (for Gemini models)
-
Get Google AI API Key:
- Visit: https://makersuite.google.com/app/apikey
- Create a new API key
- Copy the key (should start with 'AIza')
-
Create environment file:
cp env.example .env
-
Edit .env file:
# Replace with your actual API key GOOGLE_API_KEY=your_actual_api_key_here -
Test your API key:
python test_api_key.py
This will validate your API key before running the app.
-
Navigate to project:
cd /media/cybter/Software/ADK-Project/LocalLearn-AI -
Install dependencies:
pip install -r requirements.txt
-
Run the app:
streamlit run main.py
-
Open browser at
http://localhost:8501
- Select your language from dropdown (e.g., Hindi, Tamil, Telugu)
- Type any topic (e.g., "Newton's First Law", "Photosynthesis", "Gravity")
- Click "🎯 Explain"
- Get explanation in local dialect with real-life examples
- Click "🔊 Listen" to hear the explanation
- After getting explanation, click "🔍 Make Even Simpler"
- Gets ultra-simple 5-6 sentence version with ONE main idea
- Click "Browse files" under "Upload a textbook photo"
- Upload photo (PNG, JPG, JPEG)
- View the image
- Type the topic name from the image
- Click "🎯 Explain"
Note: OCR is optional - just type the topic manually after viewing the image
| Language | Regional Examples Used |
|---|---|
| Hindi | Cricket, bus travel, chai shops, farming, Diwali |
| Tamil | Temple visits, filter coffee, auto rides, Pongal |
| Telugu | Movies, biryani, local markets, Sankranti |
| Bengali | Fish markets, tram rides, Durga Puja, sweets |
| Marathi | Local trains, vada pav, Ganesh Chaturthi |
| Gujarati | Dhokla, garba, business, kite flying |
| Kannada | Coffee estates, BMTC buses, tech parks, Dasara |
| Malayalam | Coconut trees, boat rides, Onam, fish curry |
| Punjabi | Wheat farming, bhangra, tractors, Lohri |
| Urdu | Biryani, cricket, qawwali, markets |
| English | Daily life in India, cricket, local transport |
The app uses Google ADK's Agent-to-Agent (A2A) communication:
┌─────────────┐ ┌──────────────┐ ┌──────────────┐
│ Root Agent │ ───> │ Explain Agent│ ───> │ Refiner Agent│
│ (Analyzes) │ │ (Generates) │ │ (Polishes) │
└─────────────┘ └──────────────┘ └──────────────┘
- Analyzes the topic
- Identifies key concepts to explain
- Selects appropriate regional examples
- Passes context to Explain Agent
- Generates explanation in target language
- Uses dialect-aware prompts
- Includes 2-3 real-life examples from regional context
- Avoids technical jargon
- Passes to Refiner Agent (A2A Communication)
- Reviews and improves clarity
- Maintains regional dialect
- Polishes language while keeping it simple
- Ensures conversational tone
- Outputs final explanation
Each agent receives carefully crafted prompts:
prompt = f"""
Explain the topic: {topic}
Language: {language}
Tone: Friendly teaching style for beginners.
Dialect: Use regional slang/phrases naturally but keep accuracy.
Add 2-3 real-life situations from: {regional_context}
Avoid heavy technical words. Focus on simple understanding.
Do NOT just translate - adapt the teaching style for local understanding.
"""REGIONAL_CONTEXTS = {
"Hindi": "cricket, bus travel, chai shops, farming, festivals like Diwali",
"Tamil": "temple visits, filter coffee, bus/auto rides, Pongal festival",
# ... more languages
}Normal Mode: Detailed with 2-3 examples, conversational tone
Simplified Mode:
- Maximum 5-6 sentences
- ONE main idea
- ONE clear example
- ZERO technical terms
- Frontend: Streamlit (Python web framework)
- AI Engine: Google ADK (Multi-Agent Development Kit)
- TTS: gTTS (Google Text-to-Speech)
- Image Processing: Pillow (PIL)
- Multi-Agent Communication: ADK NodeGroup with A2A
Physics:
- Newton's First Law
- Gravity
- Kinetic Energy
- Friction
Chemistry:
- Photosynthesis
- Chemical Bonds
- Acids and Bases
Biology:
- Cell Division
- Digestive System
- DNA Structure
Math:
- Pythagoras Theorem
- Fractions
- Quadratic Equations
General Science:
- Water Cycle
- Solar System
- Electricity
# Test your API key first
python test_api_key.py- API key format: Must start with 'AIza'
- Get new key: https://makersuite.google.com/app/apikey
- Check .env file: Ensure it's in project root
- Copy correctly: No extra spaces or characters
- Rate Limiting: Google TTS has usage limits. If you see "429 Too Many Requests", wait 5-10 minutes
- Offline Fallback: App automatically tries offline TTS (pyttsx3) when Google TTS fails
- Internet Required: Online TTS requires internet; offline TTS works without connection
- Language Support: Online TTS supports 11 languages; offline TTS is English-only
- Text Length: Very long explanations may cause issues with online TTS
- Ensure all dependencies are installed:
pip install -r requirements.txt - Check Python version (3.8+ required)
- Try:
streamlit run main.py --server.headless true
# If dependency conflicts:
pip install --upgrade pip
pip install -r requirements.txt --force-reinstallLocalLearn-AI/
├── main.py # Main Streamlit app
├── requirements.txt # Dependencies
├── agents/
│ └── tutor_agent.py # Multi-agent system logic
├── utils/
│ └── audio_utils.py # TTS functionality
└── README.md # This file
This app helps students who:
- Are more comfortable in their mother tongue
- Struggle with English-only educational content
- Need relatable, context-specific examples
- Want to hear concepts in familiar terms
Making science accessible, one local language at a time.
Ideas to extend:
- Add more languages (Assamese, Odia, etc.)
- Improve regional context examples
- Add actual OCR integration
- Create mobile app version
- Add quiz/test features
Open-source for educational purposes.
- AI Framework: Google ADK (Agent Development Kit)
- TTS: Google Text-to-Speech (gTTS)
- UI: Streamlit
- Concept: Bridging language barriers in education
Made with ❤️ for students learning in their mother tongue
LocalLearn - Making science accessible in every language
Banner Title: "LocalLearn – Science in Your Language & Style"