ECHO-PI is a comprehensive offline assistant designed for emergency situations and educational support in connectivity-deprived areas. It features an offline English-to-Kannada translator, an AI chat assistant powered by Ollama Llama 3.2, SOS emergency alerts, offline Wikipedia, and admin dashboard.
- Offline Translator: English to Kannada using Helsinki-NLP/opus-mt-en-dra model
- AI Chat Assistant: Powered by Ollama Llama 3.2 (fully offline)
- SOS Emergency Alert: Trigger alerts from the app, viewable in admin panel
- Offline Wikipedia: Built-in Wikipedia server via Kiwix
- Admin Dashboard: View SOS stats and history
- Dynamic IP Support: Works across all devices on local network
- Node.js (v18+)
- Python 3.8+
- Ollama installed with llama3.2:3b model
- Kiwix-serve (for offline Wikipedia)
git clone https://github.com/ADITYA02NM/ECHO-PI.git
cd ECHO-PI
npm install# Create and activate virtual environment
python3 -m venv venv
source venv/bin/activate
# Install Python dependencies
pip install flask flask-cors transformers torch sacremoses
pip install requests# This requires internet for initial download only
python -c "from offline_translator.translator import OfflineTranslator; OfflineTranslator(model_path='./model')"# Install Ollama (if not already installed)
curl -fsSL https://ollama.com/install.sh | sh
# Pull the Llama 3.2 3B model
ollama pull llama3.2:3b# Download Wikipedia ZIM file from kiwix.org
# Place it at: /home/aditya/kiwix/wikipedia_en_100_2026-01.zim./venv/bin/python server.pyThis starts:
- Flask API server (port 5001)
- Kiwix Wikipedia server (port 5002)
- Ollama chat integration
npm run dev| Service | Port | URL |
|---|---|---|
| Frontend | 8080 | http://localhost:8080 |
| Backend API | 5001 | http://localhost:5001 |
| Wikipedia | 5002 | http://localhost:5002 |
| Ollama | 11434 | http://localhost:11434 |
| Endpoint | Method | Description |
|---|---|---|
/health |
GET | Server health check |
/translate |
POST | Translate English→Kannada |
/chat |
POST | AI chat with Llama 3.2 |
/sos/alert |
POST | Trigger SOS alert |
/admin/stats |
GET | Get SOS statistics |
/admin/sos/history |
GET | Get SOS alert history |
/wikipedia/url |
GET | Get Wikipedia URL |
ECHO-PI/
├── server.py # Flask backend (API, Kiwix, Ollama)
├── venv/ # Python virtual environment
├── model/ # Translation model files
├── offline_translator/# Translator module
├── src/ # React frontend
│ ├── pages/ # App pages
│ ├── components/ # UI components
│ └── lib/ # Utilities
├── package.json # Frontend dependencies
└── README.md # This file
# Start Ollama manually
ollama serve
# Check installed models
ollama list# Re-download the model
python -c "from offline_translator.translator import OfflineTranslator; OfflineTranslator(model_path='./model')"- Requires ~2.3GB RAM
- Close other applications to free memory
- Or use smaller model:
ollama pull llama3.2:1band updateOLLAMA_MODELin server.py
All services run on 0.0.0.0 (all interfaces), so they are accessible from:
localhost127.0.0.1- Your local IP (e.g.,
http://192.168.x.x:8080)
This allows other devices on the same network to access the app.
MIT