Web app for crop leaf disease hints using EfficientNet → TensorFlow Lite, with a Next.js UI.
Trained weights live under ml/models/ (gitignored). You do not need Kaggle or local training if you install models once:
- Get a direct
.zipURL from a maintainer (e.g. GitHub Releases). - From the repo root:
pip install -r ml/requirements-inference.txt
export CROPINTEL_MODELS_URL='https://example.com/cropintel-models.zip'
python3 -m ml.scripts.fetch_models- Install Node deps and start the app:
npm install
npm run devOpen http://localhost:3050. The API runs scripts/predict.py with python3.
export CROPINTEL_MODELS_URL='https://example.com/cropintel-models.zip' # required for first-time fetch
docker compose up --buildModels are stored in ./ml/models on your machine. Set NEXT_PUBLIC_GOOGLE_MAPS_API_KEY in .env if you use the outbreak map.
See ml/README.md: Kaggle API, download_datasets.py, and training scripts. Use pip install -r ml/requirements.txt (includes kaggle).
After training, package ml/models/:
pip install -r ml/requirements.txt # or minimal env with ml on PYTHONPATH
python3 -m ml.scripts.package_models -o cropintel-models.zipUpload cropintel-models.zip to a release and share the direct download URL as CROPINTEL_MODELS_URL.
app/— Next.js (UI +/api/predict)scripts/predict.py— inference entrypoint for the APIml/— training,tflite_predictor, config
MIT