CoolFace
Apppublic

alabitech2019/Farmer-assistant-ai

sourceHugging Faceupdated 1y agoView on Hugging Face
0likes
App README

🌿 AI-Powered Crop Assistant (Streamlit App)

Welcome to the AI Crop Assistant β€” an intelligent tool for farmers, researchers, and agritech teams to:

  • β€”πŸ¦  Detect crop leaf diseases from images using a deep learning CNN (MobileNetV2)
  • β€”πŸŒΎ Predict expected crop yield based on soil and climate conditions using Random Forest
  • β€”πŸ“Š Explain predictions with SHAP (model explainability) and Grad-CAM (visual heatmaps)
  • β€”πŸ“₯ Download prediction reports in CSV format

πŸ“‚ Features

FeatureDetails
Leaf disease detectionImage classification using CNN
Grad-CAMVisual explanation of predictions
Crop yield predictionBased on rainfall, temp, humidity, pH
SHAPTabular model explainability
Downloadable reportsCSV summaries of yield predictions

πŸ›  How It Works

  1. 1.Upload a crop leaf image to detect disease
  2. 2.Enter farming parameters (rainfall, temp, etc.)
  3. 3.Select crop type and predict expected yield
  4. 4.View explanation (SHAP) and Grad-CAM visual
  5. 5.Download report πŸ“„

🧠 Technologies Used

  • β€”Streamlit
  • β€”TensorFlow (CNN with MobileNetV2)
  • β€”scikit-learn (Random Forest)
  • β€”SHAP (Explainability)
  • β€”OpenCV, Matplotlib, Pillow

πŸ“¦ Requirements

All dependencies are defined in requirements.txt and installed automatically by Hugging Face Spaces.


πŸ“ Notes

  • β€”The CNN model (.h5) is downloaded via gdown from Google Drive
  • β€”Make sure your file is publicly shared via Drive (or uploaded if <500MB)

πŸš€ Live App

πŸ‘‰ Click β€œOpen in Spaces” above to use the app directly.