title: Cropiee Assistant
emoji: πΏ
colorFrom: green
colorTo: blue
sdk: docker
pinned: false
πΏ Cropiee | Smart Agricultural Intelligence
Cropiee is a state-of-the-art agricultural assistant powered by Machine Learning and Deep Learning. It provides farmers and agricultural researchers with precision insights on crop recommendations, soil analysis, and real-time market trends through a modern, responsive web interface.
π Key Features
- πΎ Crop Recommendation Engine: Uses an AdaBoost model to suggest the most suitable crops based on a user's geographical location (weather) and soil chemical readings (N, P, K, pH).
- π± In-Depth Soil Analysis: Predicts the ideal soil parameters for a specific crop in a given location using a specialized soil prediction model.
- π Interactive Data Visuals: Features dynamic Radar Charts directly in the chat bubbles to visualize soil health and chemical distribution.
- π° Market Pricing Insights: Integration with the National Data API (
data.gov.in) to fetch real-time modal prices for crops in specific districts. - π€ Advanced NLP: Utilizes DistilBERT for intent classification and sentiment analysis to provide more human-like, empathic responses.
- π Eco-Dark & Light Modes: A premium glassmorphism-based UI designed for both day and night use.
- π± Fully Responsive: Optimized for Desktop, Tablet, and Mobile devices.
π οΈ Technology Stack
- Backend: Python, Flask, Flask-Session
- Frontend: Vanilla JS (ES6+), CSS3 (Glassmorphism), HTML5
- Machine Learning: Scikit-learn (AdaBoost, Random Forest), XGBoost, Prophet
- Deep Learning: HuggingFace Transformers (DistilBERT)
- APIs: OpenWeatherMap (Weather), Data.gov.in (Market Prices), Ngrok (Tunneling)
- Visualizations: Chart.js
π Project Structure
Mtech dissertation/
βββ executable_code/ # Main Application Dashboard
β βββ app.py # Flask Backend & Logic
β βββ templates/ # UI Components (index.html)
β βββ requirements.txt # Python Dependencies
β βββ run_app.bat # One-click Windows Launcher
βββ models/ # Trained ML/DL Model Binaries (.pkl)
βββ papers/ # Research & Analysis Papers (Git Ignored)
βββ documentation/ # System Manuals & Presentation
βοΈ Installation & Setup
1. Prerequisites
Ensure you have Python 3.8+ installed on your system.
2. Set Up Virtual Environment
It is highly recommended to use a virtual environment to avoid dependency conflicts.
# Create venv
python -m venv venv
# Activate venv (Windows)
.\venv\Scripts\activate
3. Install Dependencies
pip install -r executable_code/requirements.txt
4. Natural Language Model
The app uses SpaCy for entity extraction. Ensure the English model is downloaded:
python -m spacy download en_core_web_sm
π How to Run
Option 1: Windows (Recommended)
Double-click the run_app.bat file located inside the executable_code folder.
Option 2: Terminal
cd executable_code
python app.py
After starting, the application will be accessible at:
- Local:
http://127.0.0.1:5000 - Public (Ngrok): The terminal will display a unique public URL if your Ngrok token is valid.
π Usage Guide
- Onboarding: On your first visit, follow the 3-step guide to learn how to interact with Cropiee.
- Crop Recommendation: Click the "πΏ Recommend" chip or type "What should I grow in [Location]?" follow the prompts to enter your soil test values.
- Soil Advice: Type "Soil for rice in [Location]" to see a graphical radar chart of the ideal parameters.
- Dark Mode: Use the moon icon in the top right for a low-light "Eco-Dark" interface.
π Academic Context
This project was developed as part of an M.Tech Dissertation to demonstrate the feasibility of bringing complex Deep Learning models to the edge in an accessible, user-friendly format for precision agriculture.