Giter Club home page Giter Club logo

ravib007 / agriculture-portal Goto Github PK

View Code? Open in Web Editor NEW

This project forked from vaishnavid0604/agriculture-portal

0.0 0.0 0.0 9.29 MB

ML solutions and other API based features to support Agriculture and Farmers. Goto Wiki or click on below link for Project Report.

Home Page: https://github.com/vaishnavid0604/agriculture-portal/files/12669256/Report.pdf

License: MIT License

JavaScript 0.23% Python 0.84% PHP 96.69% CSS 0.91% Hack 1.33%

agriculture-portal's Introduction

Agriculture Portal

  • Agriculture Portal is a machine learning-based project designed to provide predictions and recommendations for farmers. The system uses different algorithms to predict crops, recommend fertilizers, and provide rainfall and yield predictions to help farmers make informed decisions about their crops.
  • IT also has direct crop sales to customer with real payment interface using Stripe API.
  • Other supporting features are Chatbot using OPENAI's gpt-3.5-turbo model, Weather Forecast upto 4 days using Weather API, Agriculture realetd news using News API.

Pre Requisites

Get Below API Keys

Gmail SMTP Setup

  1. Setup app password for gmail
  2. Open fsend_otp.php and csend_otp.php files and change username and password.
function smtp_mailer($to,$subject, $msg){
	require_once("../smtp/class.phpmailer.php");
	$mail = new PHPMailer(); 
	$mail->IsSMTP(); 
	$mail->SMTPDebug = 0; 
	$mail->SMTPAuth = TRUE; 
	$mail->SMTPSecure = 'ssl'; 
	$mail->Host = "smtp.gmail.com";
	$mail->Port = 465; 
	$mail->IsHTML(true);
	$mail->CharSet = 'UTF-8';
	$mail->Username = "[email protected]";    // Change it to yours email address
        $mail->Password = "password"; 	
        $mail->SetFrom("[email protected]");   // App Password, (16 character Key)
	$mail->Subject = $subject;
	$mail->Body =$msg;
	$mail->AddAddress($to);
	if(!$mail->Send()){
		return 0;
	}else{
		return 1;
	}
}

Installation

  1. Clone the repository to your local machine.
git clone https://github.com/vaishnavid0604/agriculture-portal.git
  1. Goto Farmers folder and Install the required packages using pip.
pip install -r requirements.txt
  1. Change Success Url and Cancel Url file paths in customer/cbuy_crops.php.
$session = \Stripe\Checkout\Session::create([
'payment_method_types' => ['card'],
	'line_items' => [[
	'price_data' => [
		'product' => 'prod_NdAYaoDLX3DnMY',
		'unit_amount' => $TotalCartPrice,
		'currency' => 'inr',
		],
		'quantity' => 1,
		]],
	'mode' => 'payment',
	'success_url' => 'http://localhost/projects/agri2/customer/cupdatedb.php',   // Change File Path
	'cancel_url' => 'http://localhost/projects/agri2/customer/cbuy_crops.php',   // Change File Path
]);
  1. Add API Keys to respective files.
  • News API Key to fnewsfeed.php
  • OpenWeatherMap API Key to fweather_forecast.php
  • Stripe API Key to customer/stripePayment/config.php
  • OpenAI API Key to index.php and fchatgpt.php
  1. Import database from db folder.
  2. Run Apache web server using XAMPP.

Features

  • Crop Prediction
  • Crop Recommendation
  • Fertilizer Recommendation
  • Rainfall Prediction
  • Yield Prediction
  • OTP Verification through mail
  • Agriculture realetd news using News API
  • Chatbot using OpenAI's gpt-3.5-turbo model
  • Dynamically changing quotes using OpenAI's API
  • Weather Forecast upto 4 days using OpenWeatherMap API
  • Direct crop sales to customer with real time payment interface using Stripe API

Technologies Used

  • Python
  • PHP
  • Pandas
  • NumPy
  • JavaScript
  • HTML/CSS
  • Bootstrap4
  • Scikit-learn

Dataset

The Crop Management System dataset includes the following features:

Crop Prediction Dataset

  • State_Name
  • District_Name
  • Season
  • Crop

Crop Recommendation Dataset

  • N
  • P
  • K
  • Temperature
  • Humidity
  • pH
  • Rainfall
  • Label

Fertilizer Recommendation Dataset

  • Temparature
  • Humidity
  • Soil Moisture
  • Soil Type
  • Crop Type
  • Nitrogen
  • Phosphorous
  • Potassium
  • Fertilizer Name

Rainfall Prediction Dataset

  • SUBDIVISION
  • YEAR
  • JAN
  • FEB
  • MAR
  • APR
  • MAY
  • JUN
  • JUL
  • AUG
  • SEP
  • OCT
  • NOV
  • DEC
  • ANNUAL
  • Jan-Feb
  • Mar-May
  • Jun-Sep
  • Oct-Dec

Yield Prediction Dataset

  • State_Name
  • District_Name
  • Crop_Year
  • Season
  • Crop
  • Area
  • Production

How to Use

  • Crop Prediction: Input State_Name, District_Name, and Season to get the predicted crop for that location.
  • Crop Recommendation: Input N, P, K, Temperature, Humidity, pH, and Rainfall for that location to get recommended crops for that location.
  • Fertilizer Recommendation: Input Temperature, Humidity, Soil Moisture, Soil Type, Crop Type, Nitrogen, Phosphorous, and Potassium to get recommended fertilizer for that crop and location.
  • Rainfall Prediction: Input Subdivision and Year to get rainfall prediction for that year.
  • Yield Prediction: Input State_Name, District_Name, Crop_Year, Season, Crop, Area, Production to get predicted yields for that crop and location.

License

This project is licensed under the MIT License.

agriculture-portal's People

Contributors

vaishnavid0604 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.