Empowering Ethiopian farmers with AI-driven agricultural insights in local languages (Amharic, Oromo, Tigrinya, Somali). Get crop recommendations, weather forecasts, pest alerts, and market prices via voice/text — bridging the digital divide for smallholder farmers.
# 🌿 Farmer Health AI (Django + Gemini)
AI health assistant for Ethiopian farmers (human, livestock, plant health).
Languages: Amharic, Oromiffa, Tigrinya, Somali. Supports text, image, and voice input.
---
## 🖥️ RUN ON WINDOWS (Local Setup)
Open **Command Prompt (cmd)** or **PowerShell** in the project folder and run these commands ONE BY ONE:
### 1. Create a virtual environment
```
python -m venv venv
```
### 2. Activate it
```
venv\Scripts\activate
```
> If PowerShell blocks it, run: `Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass` then try again.
### 3. Install dependencies
```
pip install -r requirements.txt
```
### 4. Set your Gemini API key (Windows)
```
set GEMINI_API_KEY=YOUR_ACTUAL_GEMINI_API_KEY_HERE
```
> ⚠️ This only lasts for the current terminal session. You'll need to run it every time you open a new terminal — OR edit it directly in `farmerapp/settings.py` (line with `GEMINI_API_KEY`) for local testing.
### 5. Run migrations (sets up the database)
```
python manage.py makemigrations
python manage.py migrate
```
### 6. (Optional) Create admin account
```
python manage.py createsuperuser
```
### 7. Run the server
```
python manage.py runserver
```
### 8. Open in browser
Go to: **
127.0.0.1
To open on your phone (same WiFi):
```
python manage.py runserver 0.0.0.0:8000
```
Then on your phone browser go to: `
your_laptop_ip` (find your IP with `ipconfig`)
---
## 🔑 Get a Free Gemini API Key
1. Go to
aistudio.google.com
2. Sign in with Google
3. Click "Create API Key"
4. Copy it and use it in step 4 above
---
## ☁️ DEPLOY FOR FREE (Render.com)
1. Push this project to GitHub (create a new repo, upload all these files)
2. Go to
render.com → Sign up free
3. Click **New + → Web Service**
4. Connect your GitHub repo
5. Settings:
- **Build Command**: `pip install -r requirements.txt && python manage.py collectstatic --noinput && python manage.py migrate`
- **Start Command**: `gunic …