Backend for the PhytoVigil application, developed with FastAPI, featuring:
user
, admin
)git clone https://github.com/badie16/PhytoVigil.git
cd PhytoVigil/backend
python -m venv venv
source venv/Scripts/activate # Windows (Git Bash)
# or
source venv/bin/activate # Linux/macOS
pip install -r requirements.txt
Create a .env file in the /backend/ directory:
DATABASE_URL=postgresql://username:password@localhost:5432/phytovigil
ALGORITHM=HS256
ACCESS_TOKEN_EXPIRE_MINUTES=60
GEMINI_API_KEY=your_gemini_api_key_here
uvicorn app.main:app --reload
Access auto-generated documentation:
The AI model is located in:
/app/ml/
├── model.h5 ← Trained TensorFlow model
├── class.json ← ID to disease name mapping
└── diagnosis.py ← Prediction code
The backend queries the Gemini API to provide users with detailed information and natural solutions for detected diseases, enhancing user experience with dynamic, tailored content.
/backend
├── app/
│ ├── main.py
│ ├── database.py
│ ├── routes/
│ ├── models/
│ ├── schemas/
│ ├── crud/
│ ├── core/
│ ├── ml/
│ └── utils/
├── notebooks/
├── requirements.txt
├── .env
└── README.md
This project is licensed under Apache 2.0 - see the LICENSE file.
Badie Bahida – @badie16
2025 Internship – Project: 🌿 PhytoVigil