This project uses Django for the backend and React for the frontend.
- Python 3.x
- Node.js & npm
- pip (Python package manager)
-
Navigate to the backend directory:
cd plant_disease_detector -
Create a virtual environment and activate it:
python -m venv venv source venv/bin/activate -
Install dependencies:
pip install -r requirements.txt
-
Generate a free Gemini API key:
- Visit Google AI Studio and sign in with your Google account.
- Click "Create API key" and copy the generated key.
-
Add the Gemini API key to a
.envfile in the plant_disease_detector directory which is backend directory:- Create a file named
.env(if it doesn't exist). - Add the following line, replacing with your actual key:
GEMINI_API_KEY = 'Your Gemini API Key Here'
- Create a file named
-
Start the Django server:
python manage.py runserver
- Navigate to the frontend directory:
cd plant_disease_detector_frontend - Install dependencies:
npm install
- Start the React development server:
npm run dev
- The backend runs on http://127.0.0.1:8000
- The frontend runs on http://localhost:5173
- Ensure both servers are running for full functionality.
- Update API endpoints in the React app if the backend URL changes.