Thesis

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 59

Project Report On

”KRISHIKARAN - A Web Based Portal


for Farmers”

Submitted in partial fulfilment for the


degree of Bachelor of Technology in
Information Technology

Submitted by
Nikita Nawle ( 28 )
Vaibhavi Parmar ( 32 )
Dhanashree Thakur ( 54 )

Under the guidance of


Dr. Sanjay Shitole
HOD, Information Technology

Usha Mittal Institute of Technology


S.N.D.T. Women’s University,
Juhu Tara Road, Santacruz (West),
Mumbai-400049.
2022-2023
CERTIFICATE

This is to certify that Nikita Nawle, Vaibhavi Parmar and Dhanashree Thakur
has completed the project report on the topic “Krishikaran: A web based Farmer
Portal” satisfactorily in partial fulfillment for the Bachelor’s Degree in Informa-
tion Technology under the guidance of Dr. Sanjay Shitole during the 2022-23 as
prescribed by S.N.D.T. Women’s University, Mumbai.

Guide Head Of Department

Dr. Sanjay Shitole Dr. Sanjay Shitole

Principal
Dr. Shikha Nema

Examiner 1 Examiner 2
Abstract

Krishikaran’s innovative approach to farming through its comprehensive mod-


ules, including crop and fertilizer recommendations, access to government schemes,
and AI-powered chatbot assistance, is empowering farmers and revolutionizing the
agriculture industry.The world is rapidly moving towards digitization. In these
tough times where everyone is not so comfortable with the digital world, there are
many classes in the society that faces difficulties in updating themselves and to
keep up with their professional requirements at the same time. There are many
classes that are neglected during the ongoing pandemic situation, whose issues
aren’t addressed, whereas they actually play an important role in society as well
as in maintaining ecological balance. Agriculture is an important sector in India.
It is indispensable for the sustenance and growth of the Indian economy. On an
average, about the 70 per cent of the households and 10 per cent of the urban
population is dependent on agriculture as their source of livelihood. Agriculture is
the primary source of food and plays an important role in employment and econ-
omy in India. Thereby to address some of these issues, this system is developed in
order to help and uplift the Farmer’s community as they play vital role in many
aspects. Some of the issues would be addressed that are on high priority currently.
The whole system is developed with a motive to help the unaddressed community
that selflessly delivers to us a keen interest towards working for a social cause.
Contents

Abstract i

List of Figures iii

1 Introduction 1
1.1 Objectives of the Study . . . . . . . . . . . . . . . . . . . . . . . . . 3

2 Review of Literature Survey 4

3 Technology Used 11
3.1 Requirement Specification . . . . . . . . . . . . . . . . . . . . . . . 11
3.2 HARDWARE AND SOFTWARE REQUIREMENTS . . . . 11
3.2.1 Technologies . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.2.2 Libraries Used . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.3 System Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3.4 Activity Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
3.5 Use Case . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
3.6 Existing System Architecture . . . . . . . . . . . . . . . . . . . . . 18
3.7 Proposed System Architecture . . . . . . . . . . . . . . . . . . . . . 19
3.8 Methodology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
3.8.1 Crop Recommendation . . . . . . . . . . . . . . . . . . . . . 20
3.8.2 Fertilizer Recommendation . . . . . . . . . . . . . . . . . . . 25
3.8.3 Government Schemes . . . . . . . . . . . . . . . . . . . . . . 26
3.8.4 ChatGpt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
3.9 Experimental Result: . . . . . . . . . . . . . . . . . . . . . . . . . . 27
3.10 Project Implementation . . . . . . . . . . . . . . . . . . . . . . . . 28
3.10.1 Workflow & Algorithms of our Project: . . . . . . . . . . . . 28

4 Implementation and Experimental Result 32


4.1 Project Implementation . . . . . . . . . . . . . . . . . . . . . . . . 32
4.1.1 Workflow & Algorithms of our Project: . . . . . . . . . . . . 32

i
4.2 Algorithm of our Project: . . . . . . . . . . . . . . . . . . . . . . . 36
4.3 Experimental Result: . . . . . . . . . . . . . . . . . . . . . . . . . . 37
4.4 Analysis of Results . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
4.5 Testing and Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . 40
4.6 Comparision of the work with existing work . . . . . . . . . . . . . 40
4.7 Result . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42

5 Conclusion and Future scope 48

ii
List of Figures

3.1 Activity Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17


3.2 Use Case Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
3.3 Proposed system Architecture of Crop Prediction and Fertilizer Rec-
ommendation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
3.4 Proposed system Architecture of Government Schemes . . . . . . . 20
3.5 Accuracy comparision . . . . . . . . . . . . . . . . . . . . . . . . . 27
3.6 Machine Learning vice Accuracy Result . . . . . . . . . . . . . . . . 27

4.1 Accuracy comparision . . . . . . . . . . . . . . . . . . . . . . . . . 37


4.2 Machine Learning vice Accuracy Result . . . . . . . . . . . . . . . . 38
4.3 Unit Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
4.4 Home Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
4.5 About Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
4.6 Crop Prediction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
4.7 Crop Prediction Result . . . . . . . . . . . . . . . . . . . . . . . . . 43
4.8 Fertilizer Recommendation . . . . . . . . . . . . . . . . . . . . . . . 44
4.9 Fertilizer Recommendation Result . . . . . . . . . . . . . . . . . . . 44
4.10 Government Schemes . . . . . . . . . . . . . . . . . . . . . . . . . . 45
4.11 Government Individual Scheme . . . . . . . . . . . . . . . . . . . . 46
4.12 Chatgpt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
4.13 Chatbot with Chatgpt . . . . . . . . . . . . . . . . . . . . . . . . . 47

iii
Chapter 1

Introduction

Agriculture is an essential industry that plays a vital role in feeding the world’s
population. With the increasing global population, it is essential to adopt sustain-
able agricultural practices to ensure food security and promote economic develop-
ment.To support this cause, an agriculture portal has been created to provide a
comprehensive platform for farmers, agribusinesses, researchers, and policymakers
to share knowledge, resources, and ideas. The portal aims to promote sustainable
agriculture by providing information on modern farming techniques, crop manage-
ment, livestock rearing, and pest control. The agriculture portal is also committed
to creating awareness about the importance of sustainable agriculture and promot-
ing best practices that minimize the impact of farming on the environment. It will
provide a platform for farmers to learn about the latest advancements in agricul-
ture and connect with experts in the field to gain valuable insights and advice.

Krishikaran leverages advanced technologies similar as Machine Learning and


Deep Learning to dissect vast quantities of data from rainfall stations. To achieve
high crop yields and ensure agricultural success, farmers need to manage various
factors such as Crop recommendation, fertilizer recommendations, Plant disease
prediction system and Government scheme. These factors can impact the overall
productivity of crops, and failure to manage them effectively can lead to significant
losses.

1
The system consists of different modules which helps the growers in numerous
aspects. The modules are:
1. Crop Recommendations.
2. Fertilizer Recommendations.
3. Crop Disease.
4. Government Scheme.
The agricultural sector is a vital component of any nation’s economy. It is respon-
sible for providing food for the population, generating employment opportunities,
and contributing to the country’s overall economic growth. In agriculture, crop
recommendations and fertilizer recommendations play a critical role in ensuring
optimal crop production. Farmers need to know the best crop varieties to plant
and the appropriate type and amount of fertilizers to use for maximum yields.
However, crop diseases pose a significant challenge to farmers, and timely identi-
fication and treatment are crucial to minimize crop losses. Governments also play
a crucial role in supporting the agricultural sector through various schemes aimed
at providing farmers with subsidies, loans, and other incentives. This ensures the
adoption of sustainable agricultural practices, enhances farmers’ livelihoods, and
contributes to food security. Therefore, understanding these key aspects of agri-
culture is essential for effective planning and sustainable growth of the sector.

Krishikaran web based portal is user-friendly and accessible to all, with a focus
on providing accurate, reliable, and up-to-date information. It will feature articles,
videos, tutorials, and interactive tools to help farmers improve their yields, reduce
their costs, and enhance the quality of their produce. This portal is a much-needed
initiative that will help farmers and other stakeholders in the agriculture sector to
stay informed, connected, and up-to-date with the latest trends and developments
in the industry. Its creation underscores the importance of sustainable agriculture
in promoting food security, reducing poverty, and promoting economic develop-
ment.

2
1.1 Objectives of the Study
The objective of this site is to give farmers a dependable and trustworthy platform
to access information and tools that will help them improve their farming methods
and increase their standard of living. The portal should strive to accomplish the
following goals:

1. Give people access to reliable and current information on agricultural meth-


ods, crop production, and other associated topics.

2. Give farmers the resources and tools they need to manage their farms prof-
itably, such as advice on which crops to grow and which fertilisers to use.

3. Make it easier for farmers to access financial resources and market opportu-
nities.

4. Promote environmental care and sustainable farming methods.

5. Make sure that all of the data and resources offered on the portal are unique.

3
Chapter 2

Review of Literature Survey

In Kiran Moraye[1], Users of the application (Smart Farm) can use a variety
of climatic parameters to predict crop yield using the research’s developed Smart
Farm. Various techniques for forecasting crop yield have been developed over a
number of years with varying degrees of success, but many of them do not account
for the climate. The best method for solving the crop yield problem practically is
machine learning. As a result, we chose 5 climatic parameters to train the model
with using the Random Forest algorithm, which we decided would give our model
the highest accuracy and best prediction. As it depends on the type of field, agri-
cultural inputs like pesticides, fertilizers, chemicals, soil quality, etc. were not used.

In Y. Jeevan Nagendra Kumar [2], Due to the significant impact of its


rural economy, cotton, also known as ”White Gold,” has been an important com-
mercial crop of national significance. Technology transfer to assess fibre quality is
becoming more significant for crop yield when compared to Random Forest, Sup-
port Vector Machine, Weather, and K Nearest Neighbour, each of which exhibits
superior performance results for the chosen weather parameters. Crop yield rate
is influenced by a number of factors, including geography, soil type, nutrients, al-
kalinity, weather, and others. These factors can be combined to choose the best
crops for a farm or piece of land in order to maximise yield. Weather and soil
parameters like soil type, soil fertility, maximum temperature, minimum temper-
ature, and rainfall are discussed in this manuscript.

4
In Dr A Senthil Kumar [3],Our research aims to help ranchers assess the
quality of the soil by looking at its various borders and recommending crops based
on the findings using an information mining approach. The framework makes use
of the Harvest Suggestion Framework’s Arrangement calculation of the Help Vector
Machine. The system maps the soil and yield data to predict a list of reasonable
harvests for the soil and it also provides information about supplements that are
insufficient in the soil for the particular harvest. As a result, it is up to the client
to choose the crop to be planted. In this way, the framework aids in supplying the
novice ranchers with information.

In Anantha Reddy Dasari [4], The most prevalent issue Indian farmers have
is that they do not choose their crops based on the requirements of the soil, which
has a significant negative impact on their productivity. Precision agriculture can
be used to solve this issue. Three factors are taken into account by this method:
soil types, soil characteristics, and crop yield data collection. Based on these fac-
tors, the farmer is recommended a suitable crop to cultivate. In addition to the
benefits listed below, such as efficiency in both input and output, and improved
farming decision-making, precision agriculture aids in the reduction of unsuitable
crops, which in fact increases productivity. This approach offers solutions such
as proposing a recommendation system through an ensemble model with major-
ity voting methods using random tree, CHAID, K Nearest Neighbour and Naive
Bayes as learner to recommend an appropriate crop based on soil parameters with
high specific accuracy and efficacy.

In Jeevaganesh R [5], Climate factors like temperature, rainfall, soil quality,


and fertilisers are the main determinants of crop yield. These variable factors have
a negative impact on production, which makes it even more important to be pre-
cise when properly analysing crop production under changing climatic conditions.
Researchers have recently started using machine learning algorithms to predict
crop yields prior to planting. The machine learning algorithm AdaBoost has been
suggested in this research study to forecast crop yield based on variables like state,
district, area, seasons, rainfall, temperature, and area.

5
In Vijay S. Rajpurohit [6], Every crop must be carefully chosen when plan-
ning an agricultural project. The choice of crops will be influenced by a variety
of factors, including market price, production rate, and government policies. To
improve changes in our Indian economy, the agriculture sector needs to undergo
numerous changes. Using machine learning techniques that are simple to im-
plement in the farming sector, we can improve agriculture. Along with all the
improvements in the tools and technologies used in farming, accurate and useful
information about various topics is also crucial. The goal of this paper is to put the
crop selection method into practise so that it can help farmers and agriculturalists
solve a variety of issues. This increases crop yield rates, which benefits our Indian
economy.

In Chintal Raval [7], The proposed IoT and ML system, which uses sensors
to enable soil testing, is based on measuring and observing soil parameters. This
system lessens the likelihood of soil deterioration and aids in crop health mainte-
nance. This system uses various sensors to monitor temperature, humidity, soil
moisture, pH, and NPK nutrients of the soil. These sensors include soil tempera-
ture, soil moisture, pH, and others. The microcontroller stores the data collected
by these sensors and uses machine learning algorithms like random forest to anal-
yse it to generate recommendations for the growth of the most appropriate crop.

In P. Ganesh Kumar [8], More than 40% of the people in this state make
their living primarily from agriculture. Researchers with the Food and Agriculture
Organisation (FAO) predict that the population of the world will rise by one third
between 2010 and 2050. Compared to current crop production, the demand for
crop production will rise by 60%. Therefore, prediction is crucial in determining
the demand for crop production in order to maximise yield. Using K-means and
Modified K Nearest Neighbour (KNN), we suggest a prediction method for the
main crops of Tamilnadu in this paper. The tools used for clustering and classifi-
cation are WEKA and Matlab, respectively. The numerical outcome demonstrates
that our approach is superior to the conventional data mining approach.

6
In Richard Tzong-Han Tsai [9], In this paper, we focus on the chatbot-
based applications of artificial intelligence (AI) in manufacturing. We created a
chatbot that aids users in finishing an assembly task that mimics those found in
manufacturing environments. We ask users to put together a Meccanoid robot
in stages with the aid of an interactive dialogue system in order to recreate this
environment. When a user runs into difficulties during the assembly process, the
chatbot can offer solutions or instructions based on how it categorises the user’s
intent. We want to make our system better so that it can recognise users’ needs
by inferring their intent and then give them pertinent and useful information.

In Laurent Deruelle [10], In order to make their definition and deployment


easier, numerous frameworks have been developed. While these frameworks are ef-
fective for designing straightforward chatbot applications, they still call for a high
level of technical expertise to define complex interactions, and they are challeng-
ing to adapt to changing business requirements (for instance, switching NL engine
providers is frequently not possible). The deployment of a chatbot application typ-
ically necessitates a thorough understanding of the targeted platforms, particularly
back-end connections, which raises the costs of development and maintenance. We
introduce the Xatkit framework in this paper. By offering a set of DSLs to define
chatbots (and voicebots and bots in general) in a platform-independent manner,
Xatkit addresses these issues.
In John W. Castro [11], Development of chatbots is becoming more popular.
The number of experimental studies on chatbot usability has increased as a result
of the importance of usability evaluation in chatbot development. We believe a
thorough mapping study is necessary as a result. After reviewing more than 700
sources, we found 28 primary studies. It is possible to determine the state of the
art in chatbot usability experimentation by combining the research questions and
looking at the traits and metrics used to assess the usability of chatbots in experi-
ments. To determine the research questions, traits, and metrics used to assess the
usability of chatbots in experiments, we carried out a methodical mapping study.
The majority of studies used a within-subjects design.

In Zhaoxia Jing [12], This study focuses on the gas-fired power plants’ rev-

7
enue streams that are impacted by China’s Guangdong province’s power mar-
ket reform. We compare the effects of five settlement mechanisms—feed-in tariff
(FiT), location marginal price (LMP), contract for difference (CFD), direct sub-
sidy (DS), and estimated revenue method (ERM)—on market indicators for the
first time. To avoid significant profit fluctuations brought on by market reforms,
we design key parameters, including authorised CFD and ERM, of two types of
government-authorized contracts based on conventional dispatching patterns. We
also examine the effects of variables on the market as a whole and its participants,
such as climbing efficiency, seasonal load, and subsidy amount. A case study’s
findings demonstrate that directly subsidising gas-fired units will result loss of so-
cial welfare.

InChitapong Wechtaisong [13], The complexity involved with the real-time


mapping of soil fertility is the main barrier to developing a real-time context-aware
fertiliser recommendation system. Additionally, the current techniques for figuring
out the current levels of soil fertility for recommending fertiliser are expensive,
time-consuming, and labor-intensive. In order to address this problem, we suggest
a machine learning-based methodology for fertiliser recommendations based on
the context of real-time soil fertility data obtained from Internet of Things (IoT)
assisted soil fertility mapping. This methodology will increase the precision of the
fertiliser recommendation system. An IoT architecture is also suggested to support
context-aware fertiliser recommendations for real-time soil fertility mapping. For
the purpose of testing the accuracy of IoT-assisted fertility mapping, the suggested
solution is actually put into use in actual crop fields.
In Ziwei Shen [14], LSWA retains its excellent absorbability in the presence
of fertilisers and other water soluble additives and is highly absorbable even when
subjected to soil pressure. It has a lengthy effective period of seven to ten years
and is completely non-toxic. Due to its low initial cost, the significant decrease in
watering cycles, the reduction in fertiliser use, the increase in crop yield, and the
utilisation of previously unusable land, LSWA is incredibly cost-effective. More
than 50% less time can be spent on irrigation schedules and up to 33% less fer-
tiliser can be used when LSWA crystals are added to the soil. This paper reports
some fundamental studies on the fundamental characteristics of the soil additive.

8
In Huifang Dou [15], In order to estimate the soil moisture content of an
area, various prediction models have been developed. These models use empirical
data, including meteorological and remotely sensed data. This paper provides an
overview of these prediction models. The various models used cover a broad spec-
trum of machine learning methods, from basic linear regression models through
models based on the Bayesian framework, decision tree learning, and recursive
partitioning, to contemporary non-linear statistical data modelling tools like Arti-
ficial Neural Networks. All of the models’ theoretical foundations, advantages and
disadvantages, prognostication outcomes, and efficacy are discussed.

In Brady D. Lund [16], This paper provides a summary of key definitions


related to GPT, the technology that underpins ChatGPT, an open-source tool cre-
ated by OpenAI. The paper discusses the history and technology of GPT, including
its generative pre-trained transformer model, its capacity to carry out a variety of
language-based tasks, and how ChatGPT makes use of this technology to operate
as an advanced chatbot. The paper also contains an interview with ChatGPT
about its potential influence on academic institutions and libraries. The interview
covers both the advantages of ChatGPT—such as enhanced search and discov-
ery, reference and information services, cataloguing and metadata generation, and
content creation—and the ethical issues that must be taken into account. These
issues include bias and privacy.

In Almira Osmanovic Thunström [17], Based on the standards outlined


by the International Committee of Medical Journal Editors (ICMJE), this paper
investigates the possibility of a system serving as a co-author on a scholarly ar-
ticle. The effects of sleep deprivation on cognitive function was the subject of a
review paper that we wrote using a third generation generative pretrained trans-
former (GPT-3). The system was required to meet the four main requirements
for co-authorship set forth by the ICMJE, which are as follows: contributions to
conception or design; drafting the work; or critically revising it for significant in-
tellectual content; final approval of the version to be published; and agreement to
be accountable for all aspects of the work.

9
In Mr. Bachhav, Nitin Bhagachand [18], Information is a basic require-
ment of modern life. Information is needed for everything and anything. Many
different sources can be used to find or retrieve information. Farmers make up
a distinct user group with very specialised information needs. The information
requirements of the rural farmer community are the subject of the current paper.
According to the survey-based study, 71 farmers (40.58%) need daily information
for a variety of agricultural tasks. Additionally, it has been discovered that gov-
ernment agencies and newspapers are the farmers’ second and third choices for
information sources.

In V Phani Kumar [19], India is the world’s largest agrarian economy be-
cause 54% of its total land area is regarded as arable. The various factors that
contribute to low agricultural production include soil infertility brought on by
excessive fertilisation, as well as a lack of access to and awareness of modern
agricultural practises. The main goal of this research project is to create a recom-
mendation system based on machine learning to boost agricultural productivity.
In this study, sophisticated models were designed and developed to estimate the
crop, suggest fertiliser, and detect plant disease. An image of a leaf is used by
an algorithm known as MobileNet to determine whether a plant is afflicted. On
the basis of the local soil nutrients and rainfall, the XGBoost model forecasts a
suitable crop.

10
Chapter 3

Technology Used

3.1 Requirement Specification


The primary goal of the system analyst is to improve the efficiency of the existing
system. For that the study of specification of the requirements is very essential.
For the development of the new system, a preliminary survey of the existing system
will be conducted. Investigation done whether the upgrading of the system into
an application program could solve the problems and eradicate the inefficiency of
the Existing system.

3.2 HARDWARE AND SOFTWARE REQUIRE-


MENTS
HARDWARE REEQUIREMENTS

1. Processor- 1GHz CPU


2. RAM- 4GB.
3. Disk Space- 10 GB of Available Hard Disk

11
SOFTWARE REQUIREMENTS

Operating System - Windows 10

Front End
- HTML
- CSS
- JavaScript

Back End
- Python
- Jupyter Notebook
- Flask
- Matplotlib
- sklearn
- PyTorch(an open source machine learning (ML) framework )
- scikit-learn
- numpy
- Web Browser - Google Chrome
- Code Editor - Visual Studio

3.2.1 Technologies

1. Python

Python is an interpreted, object-oriented, high-level, dynamically semantic pro-


gramming language. It is very appealing for Rapid Application Development as
well as for use as a scripting or glue language to connect existing components to-
gether due to its high-level built-in data structures, dynamic typing, and dynamic
binding. Python’s straightforward syntax emphasises readability, which lowers
the expense of programme maintenance. Python’s support for modules and pack-

12
ages promotes the modularity and reuse of code in programmes. For all popular
platforms, the Python interpreter and the extensive standard library are freely
distributable and available in source or binary form.

2. Jupyter Notebook

With the goal of optimising package management and deployment, Anaconda


is a free and open-source distribution of the Python and R programming languages
for scientific computing (data science, machine learning applications, large-scale
data processing, predictive analytics, etc.). Conda, a package management system,
controls package versioning. There are more than 1500 well-known data-science
packages available in the Anaconda distribution, which is used by over 15 million
users and is compatible with Windows, Linux, and macOS. This is available for
download from the Anaconda Navigator website. A Jupyter Notebook will be re-
quired, which we can access directly through Anaconda Navigator.

3. Flask

A lightweight Python web application framework called Flask enables program-


mers to create web applications quickly. Developers can build web applications
with little to no code thanks to the straightforward and flexible interface it offers.
Developers can easily add new features and functionality to Flask because it is
created to be modular and easy to extend. It is renowned for its brevity, usability,
and flexibility and is frequently used in the creation of small to medium-sized web
applications.

4. PyTorch

Artificial neural networks can be built and trained using a variety of tools
and libraries thanks to PyTorch, an open source machine learning framework for
Python. With a user-friendly interface that makes it accessible to both beginning
and experienced developers, it is made to be flexible and simple to use. The dy-
namic computational graph that PyTorch is renowned for enables effective memory

13
usage and simple neural network debugging. It is perfect for deep learning model
training on massive datasets because it supports distributed computing and GPU
acceleration.

3.2.2 Libraries Used


1. Numpy

With a variety of tools and functions for working with arrays, matrices, and
other numerical data, NumPy is a well-known Python library for numerical com-
puting. It is made to be effective, quick, and simple to use, with an interface that
is clear and intuitive and enables developers to easily carry out challenging math-
ematical operations. Numerous mathematical operations are offered by NumPy,
such as Fourier transformations, random number generation, and linear algebra.
Because of its high performance and memory efficiency, it is frequently used in
scientific computing, data analysis, and machine learning applications.

2. sklearn

Popular open-source machine learning library for the Python programming


language is scikit-learn, also known as sklearn. It offers a wide range of tools
and features, such as classification, regression, clustering, and dimensionality re-
duction algorithms, for creating and refining machine learning models. Sklearn’s
user-friendly interface and straightforward design make it simple and effective for
developers to work with large datasets and carry out sophisticated analyses. It
also has tools for, among other things, parameter tuning, model evaluation, and
data preprocessing. For a range of machine learning applications, such as natural
language processing, computer vision, and predictive analytics, Sklearn is exten-
sively used in both industry and academia.

3. Pandas

14
Pandas is a well-known open-source library for Python that allows for data
analysis and manipulation. In addition to data frames and series, which are com-
parable to the tables in a relational database, it offers a wide range of tools and
functions for working with structured data. Pandas’ user-friendly interface makes
it simple for developers to carry out a range of data manipulation and analysis
tasks. Pandas is made to be quick, effective, and flexible. Data cleaning, transfor-
mation, and aggregation tools, as well as tools for data visualisation and statistical
analysis, are all included. Pandas is well-known for its capacity to manage sizable
datasets effectively and is utilised extensively in a variety of fields, including data
science, machine learning, and finance.

4. Matplotlib

For the Python programming language, Matplotlib is a well-liked open-source


data visualisation library. Line plots, scatter plots, histograms, and heatmaps are
just a few of the many tools and features it offers for producing high-quality, in-
teractive data visualisations. With a user-friendly interface and a flexible design,
Matplotlib enables developers to easily create complex visualisations. It has fea-
tures for changing the style and look of plots, adding labels and annotations, and
making animations and interactive widgets. Matplotlib is well-known for its ca-
pacity to produce publication-quality graphics and is used extensively in a variety
of fields, including data science, machine learning, and scientific research.

3.3 System Design


Krishikaran is a thorough farmer-based platform created to satisfy the require-
ments of farmers by offering them crop predictions, fertiliser recommendations,
and details on government programmes. The product is made to be straightfor-
ward, intuitive, and simple to use, offering a consistent user experience across all
modules. Based on weather information and historical trends, the crop prediction
module will offer farmers precise and trustworthy projections of crop yields. Using
information about the soil type and other factors, the fertiliser suggestion module
will make recommendations for the best fertiliser needs for particular crops. The

15
government scheme module will enlighten farmers about the many programmes
and subsidies the government offers to help them with their business. Based on
user feedback, the site will be continually enhanced to give farmers the most per-
tinent and current information. The overall goal of Krishikaran is to arm farmers
with the knowledge they need to make wise decisions, increase their productivity,
and increase their profitability.

3.4 Activity Diagram


For Krishikaran, an activity diagram can be created to show the interactions and
flow of activities between the user and the modules of the portal. The portal will
prompt the user to enter pertinent data, such as the NPK value (Nitrogen, phos-
phorous, and potassium), ph value, rainfall, state, and city, if the user chooses the
crop prediction module. The user will then receive precise crop yield projections
from the portal using this data.The portal will ask the user to enter information
on the soil type, NPK value (nitrogen, phosphorus, and potassium), and crop that
the user needs to cultivate in the tested soil if the user chooses the fertiliser recom-
mendation module. The portal will make recommendations for the ideal fertiliser
needs for the particular crop based on this data. The portal will provide details on
various government programmes and subsidies offered to aid farmers’ operations if
the user chooses the government scheme module. The portal will provide pertinent
information, such as eligibility requirements, application procedures, and benefits
after the user selects a specific scheme.

16
Figure 3.1: Activity Diagram

17
3.5 Use Case
The farmer can access Crop Prediction, fertilizer Recommendation , Government
Schemes and Chatgpt.

Figure 3.2: Use Case Diagram

3.6 Existing System Architecture


The current Krishikaran system architecture is made to empower farmers by giv-
ing them access to vital data on crop prediction, fertiliser recommendations, gov-
ernment schemes, and Chatgpt.The architecture includes an intuitive web-based
interface that enables farmers to enter their unique requirements, such as the NPK
value (nitrogen, phosphorous, and potassium), ph value, rainfall, state, and city,
and receive tailored recommendations based on cutting-edge machine learning al-
gorithms. The platform also incorporates ChatGPT, a cutting-edge chatbot that
employs deep learning and natural language processing to give farmers immediate
answers to their inquiries. Utilising cutting-edge machine learning algorithms, the
fertiliser recommendation module analyses soil and crop data, including nutrient
content and crop type, to recommend the ideal fertiliser requirements for particu-
lar crops. The government programmes module informs farmers about the many
programmes and subsidies the government offers to help them with their business.

18
A web-based user interface included into the system design enables farmers to en-
ter their unique needs and get tailored solutions. By giving farmers accurate and
current information, Krishikaran enables them to make the most of government
programmes and optimise their use of fertilisers, ultimately improving agricultural
output and profitability. Krishikaran is assisting farmers in making better deci-
sions and enabling them to be more successful in their agricultural endeavours by
utilising cutting-edge technologies and data-driven insights.

3.7 Proposed System Architecture


The way that Krishikaran functions as a whole is intended to give farmers a
thorough and dependable platform that allows them to make knowledgeable de-
cisions about farming. Krishikaran enables farmers to increase their production
and enhance their standard of living by offering customised crop prediction and
fertiliser recommendations, access to government programmes, and real-time assis-
tance through AI-powered chatbots. The platform’s modular design and scalability
make it possible for it to adapt and develop to meet farmers’ evolving demands and
requirements, making Krishikaran an essential tool for contemporary agriculture.
Here, we’ve created a gateway that deals with the problems our end consumers are
having. A user-friendly portal will be built as part of the project. Without having
to log in or register, the user can access this portal directly, which is hassle-free for
them. After selecting the crop recommendation system, the user must enter the
following information: the NPK (nitrogen, phosphorous, and potassium) value,
the ph value, the amount of rainfall, the state, and the city. When a user inputs
soil data and the sort of crop they are growing into the Fertiliser Recommendation
System, the application predicts what the soil is lacking and offers advancement
recommendations.

19
Figure 3.3: Proposed system Architecture of Crop Prediction and Fertilizer Rec-
ommendation

Figure 3.4: Proposed system Architecture of Government Schemes

3.8 Methodology
3.8.1 Crop Recommendation
The process for extracting sentiment includes the many steps outlined below.

Data Collection:
The dataset includes variables including soil PH, humidity, temperature, rainfall,
and elements like nitrogen (N), phosphorus (P), and potassium (K). The Kaggle
website has provided the datasets. The data set includes 3101 instances or data
that were gathered from historical data in the past. Watermelon, pomegranate, or-
ange, papaya, muskmelon, mango, apple, grapes, banana, chickpea, black gramme,

20
coconut, moon beans, kidney beans, sugarcane, peas, groundnut, cotton, coffee,
jute, lentils, maize, millet, tea, wheat, and rice are among the eleven distinct crops
included in this dataset.

Data Pre-Processing
Pre-processing is essential for a successful application. The information obtained
from many sources is occasionally in raw form. It might include some conflicting,
redundant, or incomplete data. Therefore, such redundant data needs to be fil-
tered in this step. You should normalise your data.

Different machine learning algorithms, including Decision Tree, Naive Bayse (NB),
Support Vector Machine (SVM), Logistic Regression (LR), Random Forest (RF),
and XGBoost, were used in the proposed system.

Decision Tree:
Decision tree classifiers use a greedy approach. A tree is used to represent at-
tributes and class labels in this supervised learning algorithm.By learning decision
rules derived from prior data (training data), the main goal of using a decision
tree is to create a training prototype that can be used to predict the class or value
of target variables. Decision nodes and leaves are two different types that can
be used to describe the decision tree. The outcomes, or ultimate outcomes, are
the leaves. The edges descending from each node in the tree represent one of the
potential answers to the test case, and each node serves as a test case for a partic-
ular attribute. Every sub-tree rooted at the fresh nodes undergoes this recursive
process once more.In our model, we used the decision tree approach as follows:
(i) sklearn.tree Class library Decision Tree Classifier, import.
(ii) The DecisionTree Classifier object is now created.

21
Naı̈ve Bayes (NB):
Naive Bayes is an order computation for binary and multi-class arrangement prob-
lems. The Naive Bayes approach is very simple to use when categorically or binary
input values are available. When using Naive Bayes, a classifier accepts that the
presence of one element in a class isn’t necessarily associated with the presence of
another element. The Naive Bayes classifier, which is based on the Bayes theory,
is useful when there is a high level of dimensionality in the data sources.
In our model, we used the Naive Bayes (NB) technique as:
(i) Importing the GaussianNB Classifier library from the naive bayes class in
Sklearn.
(ii)The Naive Bayes Classifier object is now created.
(iii) Last, we fitted our data.

Support Vector Machine (SVM):


A supervised machine learning technique or model called the Support Vector Ma-
chine (SVM) can be applied to classification and regression problems. But we
mainly apply it to classification problems. SVM is typically represented as training
data points in space that are divided into groups by an as-far-as-possible compre-
hensible gap.Each data item is displayed as a point in n-dimensional space using
the SVM method, and each feature value corresponds to a particular coordinate.
The categorization is then carried out by locating the hyper-plane that effectively
distinguishes the two classes.
In our model, we used Support Vector Machine (SVM) technique as:
(i) Importing the SVC library from the Sklearn.svm Class (ii) We now create an
SVM classification object . (iii) Last, we fitted our data.
Logistic Regression (LR) :
In its most basic form, the logistic regression model uses a logistic function to

22
simulate a binary dependent variable; many more intricate versions exist. In re-
gression analysis, logistic regression, a type of binomial regression, predicts the
variables of a logistic model.
Our model includes the following applications of Logistic Regression (LR):
(i) Importing the library for Logistic Regression from the sklearn.linear Class.
(ii) The LogReg classifier object is now created.
(iii) Last but not least, we fitted our data.

Random Forest (RF):


ML algorithm Random Forest is used. Numerous decision trees are created during
the training phase, and the output will be split based on the number of classes,
i.e. classification, and the class prediction, i.e. regression. Prediction accuracy is
inversely correlated with the number of trees. Rainfall, perception, temperature,
and productivity are all included in the dataset. For training, these dataset factors
are utilised. The dataset is only taken into account for two-thirds. The remain-
ing dataset is used as the experimental foundation. The random forest algorithm
contains three parameters, including n tree, which specifies the number of trees
that must develop, and m try, which specifies the number of variables that must
be taken into consideration when splitting a node. Node size - In terminal nodes,

23
it suggests how many observations we should conduct.
In our model, we used Random Forest (RF) as follows:
(i) Importing RandomForestClassifier from the class sklearn.ensemble.
(ii) We are now creating the RF classifier object.
(iii) Last but not least, we fitted our data.

XGBoost:
A flexible and enhanced version of the gradient boosting approach, known as eX-
treme Gradient Boosting (XGBoost), was created for viability, computing speed,
and model performance. It is commonly known that XGBoost offers superior
results to other machine learning methods. It belongs to the Distributed Ma-
chine Learning Community and is an open-source library. A parallel tree boosting
method called XGBoost (also known as GBDT or GBM) is available to quickly
and accurately address a variety of data science issues.
We used XGBoost in our model by :
(i) importing the xgboost library and
(ii) creating an XB classifier object.
(iii) Last, we fitted our data.

24
3.8.2 Fertilizer Recommendation
We use input data like N, P, K temperature, humidity, wetness, soil type, and the
crop to be produced in order to predict the specific fertiliser that will be used.
The loading of external fertiliser datasets is the first step in the fertiliser predic-
tion process. After the dataset has been read, various stages of pre-processing
will be carried out, as discussed in the section on data pre-processing. After pre-
processing the data, create a training dataset and train the models using SVM
and Random Forest classifier. We take into account numerous factors, including
temperature, humidity, soil PH, and the anticipated crop to be cultivated, when
predicting the fertilisers. These are the system input parameters that can be man-
ually inputted or obtained through sensors.The following table lists a summarised
fertiliser prediction model and its input parameters:

To categorise provided data, an SVM constructs hyperplanes with the biggest


margins in a high-dimensional space. The distance between the two classes’ closest
data points is represented by the margin between them.
STEP 1: Choose the feature sets from the various data classes.
STEP 2: Determine the spots where every kind of feature and plot intersect. Re-
peat for all the data features.
Remove the data from all classes and the features that intersect them in step three.

25
Plot the hyperplanes for the remaining points in step four.
STEP 5: Determine the hyperplane distances for various classes of objects.
STEP 6: Choose the hyper plane that is consistent for each kind of data in step six.

3.8.3 Government Schemes


The system includes comprehensive information about already-existing govern-
ment programmes, including how to apply, where to apply, what documents are
necessary, etc. All the necessary details to be a programme recipient are given.
Newly introduced government programmes are added to the portal by the admin.

3.8.4 ChatGpt
To use ChatGPT efficiently, a lot of resources are needed, including:
Data: Deep learning model ChatGPT was developed using a significant amount of
text data. The model will perform better if there is a greater amount of text data
available for training. Numerous text-based sources, such as web pages, books,
and other publications, can be used to gather this information.
Computational power:A lot of computer resources are needed to both train and
use the ChatGPT language model. In addition to having plenty of memory and
storage, this also entails having access to strong GPUs or TPUs.
Tools and libraries: You will need access to the required tools and libraries for
training and deploying deep learning models in order to use ChatGPT efficiently.
This covers tools for data preprocessing, deployment, training, and evaluation.
Expertise: You must be well-versed in both deep learning and natural language
processing in order to use ChatGPT to its full potential. You must also be familiar
with the specific tools and libraries that were used to create and deploy the model.
In terms of resources, OpenAI offers access to ChatGPT and other GPT-3 pre-
trained models via its API. This eliminates the need for developers to train their
own models from scratch and gives them access to the model’s capabilities.

26
3.9 Experimental Result:

Figure 3.5: Accuracy comparision

Figure 3.6: Machine Learning vice Accuracy Result

27
3.10 Project Implementation
3.10.1 Workflow & Algorithms of our Project:

1. Workflow for Crop Recommendation:

The analysis of several elements that influence crop growth, such as soil type,
climate, and accessible water resources, is often included in a crop recommenda-
tion algorithm. An overview of how such an algorithm may operate is given below:

i. Data input:
The algorithm would require input from a variety of sources, including soil maps,
meteorological information, and details on the region’s water resources.

ii. Analyzing soil data:


To ascertain the type of soil, the amount of nutrients present, and any other el-
ements that might have an impact on crop growth, soil data would be analyzed.
Both soil sampling and the use of current soil maps could be used to collect this
data.

iii. Analyzing climate data:


To ascertain the temperature, rainfall, and other weather conditions in the region,
climatic data would be analyzed. Weather stations and other sources of climatic
information could be used to collect this data.

iv. Identifying crop options:


Identifying the best crops to grow in the location would subsequently include the
algorithm comparing soil and climate data to a database of potential crops. This
database would contain details on the agricultural growth-related needs for nutri-
ents, water, and other resources.

v. Ranking crop options:

28
After the algorithm has discovered a variety of crop options, it will rate them
according to how well-suited they are to the region. The potential production of
each crop, the need for water, and the necessity for nutrients are all variables that
may be taken into account while rating these crops.

vi. Providing recommendations:


Last but not least, the algorithm would make suggestions based on the findings
to farmers or other stakeholders. This could include advice on what plants to
cultivate, how to manage the soil and water resources, and other things that could
have an impact on crop growth.

In general, a crop suggestion algorithm can assist farmers in selecting crops


with greater knowledge, which can result in higher yields, better soil health, and
more sustainable farming methods.

2. Workflow of Fertilizer Recommendation:

In order to identify the types and amounts of fertilizer required to optimize


plant growth, fertilizer recommendation algorithms often include analyzing soil
samples in order to ascertain the number of nutrients available in the soil. An
overview of how such an algorithm may operate is given below:

i. Analysis of soil samples:


Gathering and analyzing soil samples from the target area is the first step in the
procedure. Key nutrients like nitrogen, phosphorous, and potassium as well as pH
levels and other elements that may have an impact on plant growth will all be
examined in the soil samples.

ii. Mapping of soil nutrition:


To ascertain the distribution of important nutrients throughout the region, the
nutrient levels in the soil samples will next be mapped. These details will make
it easier to determine whether parts of the field could require more or less fertilizer.

29
iii. Selection of Crop Selection:
The algorithm will next estimate the ideal nutrient levels for the soil by taking
into account the crop(s) to be grown and their nutrient requirements. This step
is essential to ensuring that the proper mix of nutrients is available in the soil for
optimum growth because different crops have varying nutrient requirements.

iv. Calculation of fertilizer:


The algorithm will determine the quantity and kind of fertilizer required to achieve
the ideal nutrient balance based on the crop requirements and soil nutrient levels.
This may include suggestions for specific fertilizer types, such as those based on
nitrogen, phosphorus, or potassium, as well as the required dosages.

v. Final recommendation:
The algorithm will suggest the kind and quantity of fertilizer that should be added
to the soil. This advice might cover when and how to apply the fertilizer as well
as any other details important for optimum crop growth.
The usage of fertilizers can be optimized by farmers with the help of a fertilizer
suggestion algorithm, leading to higher crop yields, lower costs, and more environ-
mentally friendly farming methods.

3. Workflow of Chatbot with ChatGPT:

Making an algorithm that can comprehend natural language and produce suit-
able responses is a necessary step in building a chatbot. An overview of a chatbot
algorithm is given below:

i. Analysis of Input:
Whether it is a text message, voice command, or some other type of input, the
algorithm would need to analyse the user’s input. The input will be dissected into
its component parts in order to identify the key information, such as the user’s
intent, the subject under discussion, and any specific requests or questions.

ii. Recognition of intent:

30
The algorithm would next employ natural language processing (NLP) methods to
ascertain the user’s intent, or what the user is attempting to do or learn. In order
to do this, the user’s input must be examined for words, phrases, and other clues
that might reveal the user’s intention.

iii. Response generation:


After determining the user’s intent, the algorithm will select a predefined set of
responses to produce the best possible response. This could entail using rule-
based systems to link user intents to pre-defined responses, or it could entail using
machine learning algorithms to choose the best response based on the user’s input.

iv. Context Management:


The algorithm will also need to manage the context of the conversation, which en-
tails keeping track of what has been said up to this point and using that knowledge
to guide responses in the future. This might entail keeping track of user preferences
or other pertinent information, maintaining a conversation history, and using that
information to produce responses that are more tailored.

v. Learning and performance enhancement:


The chatbot algorithm can develop over time by observing how it interacts with
users. This could involve manual intervention by human operators to fine-tune
the chatbot’s responses or it could involve using machine learning algorithms to
analyze user feedback and adjust the chatbot’s responses accordingly.

A chatbot algorithm’s overall goal is to comprehend natural language, produce


appropriate responses, manage context, and learn from user interactions. A well-
designed chatbot can be a useful tool for interacting with customers, responding
to inquiries, and offering tailored support.

31
Chapter 4

Implementation and
Experimental Result

4.1 Project Implementation


4.1.1 Workflow & Algorithms of our Project:

1. Workflow for Crop Recommendation:

The analysis of several elements that influence crop growth, such as soil type,
climate, and accessible water resources, is often included in a crop recommenda-
tion algorithm. An overview of how such an algorithm may operate is given below:

i. Data input:
The algorithm would require input from a variety of sources, including soil maps,
meteorological information, and details on the region’s water resources.

ii. Analyzing soil data:


To ascertain the type of soil, the amount of nutrients present, and any other el-
ements that might have an impact on crop growth, soil data would be analyzed.
Both soil sampling and the use of current soil maps could be used to collect this

32
data.

iii. Analyzing climate data:


To ascertain the temperature, rainfall, and other weather conditions in the region,
climatic data would be analyzed. Weather stations and other sources of climatic
information could be used to collect this data.

iv. Identifying crop options:


Identifying the best crops to grow in the location would subsequently include the
algorithm comparing soil and climate data to a database of potential crops. This
database would contain details on the agricultural growth-related needs for nutri-
ents, water, and other resources.

v. Ranking crop options:


After the algorithm has discovered a variety of crop options, it will rate them
according to how well-suited they are to the region. The potential production of
each crop, the need for water, and the necessity for nutrients are all variables that
may be taken into account while rating these crops.

vi. Providing recommendations:


Last but not least, the algorithm would make suggestions based on the findings
to farmers or other stakeholders. This could include advice on what plants to
cultivate, how to manage the soil and water resources, and other things that could
have an impact on crop growth.

In general, a crop suggestion algorithm can assist farmers in selecting crops


with greater knowledge, which can result in higher yields, better soil health, and
more sustainable farming methods.

2. Workflow of Fertilizer Recommendation:

In order to identify the types and amounts of fertilizer required to optimize


plant growth, fertilizer recommendation algorithms often include analyzing soil

33
samples in order to ascertain the number of nutrients available in the soil. An
overview of how such an algorithm may operate is given below:

i. Analysis of soil samples:


Gathering and analyzing soil samples from the target area is the first step in the
procedure. Key nutrients like nitrogen, phosphorous, and potassium as well as pH
levels and other elements that may have an impact on plant growth will all be
examined in the soil samples.

ii. Mapping of soil nutrition:


To ascertain the distribution of important nutrients throughout the region, the
nutrient levels in the soil samples will next be mapped. These details will make
it easier to determine whether parts of the field could require more or less fertilizer.

iii. Selection of Crop Selection:


The algorithm will next estimate the ideal nutrient levels for the soil by taking
into account the crop(s) to be grown and their nutrient requirements. This step
is essential to ensuring that the proper mix of nutrients is available in the soil for
optimum growth because different crops have varying nutrient requirements.

iv. Calculation of fertilizer:


The algorithm will determine the quantity and kind of fertilizer required to achieve
the ideal nutrient balance based on the crop requirements and soil nutrient levels.
This may include suggestions for specific fertilizer types, such as those based on
nitrogen, phosphorus, or potassium, as well as the required dosages.

v. Final recommendation:
The algorithm will suggest the kind and quantity of fertilizer that should be added
to the soil. This advice might cover when and how to apply the fertilizer as well
as any other details important for optimum crop growth.
The usage of fertilizers can be optimized by farmers with the help of a fertilizer
suggestion algorithm, leading to higher crop yields, lower costs, and more environ-
mentally friendly farming methods.

34
3. Workflow of Chatbot with ChatGPT:

Making an algorithm that can comprehend natural language and produce suit-
able responses is a necessary step in building a chatbot. An overview of a chatbot
algorithm is given below:

i. Analysis of Input:
Whether it is a text message, voice command, or some other type of input, the
algorithm would need to analyse the user’s input. The input will be dissected into
its component parts in order to identify the key information, such as the user’s
intent, the subject under discussion, and any specific requests or questions.

ii. Recognition of intent:


The algorithm would next employ natural language processing (NLP) methods to
ascertain the user’s intent, or what the user is attempting to do or learn. In order
to do this, the user’s input must be examined for words, phrases, and other clues
that might reveal the user’s intention.

iii. Response generation:


After determining the user’s intent, the algorithm will select a predefined set of
responses to produce the best possible response. This could entail using rule-
based systems to link user intents to pre-defined responses, or it could entail using
machine learning algorithms to choose the best response based on the user’s input.

iv. Context Management:


The algorithm will also need to manage the context of the conversation, which en-
tails keeping track of what has been said up to this point and using that knowledge
to guide responses in the future. This might entail keeping track of user preferences
or other pertinent information, maintaining a conversation history, and using that
information to produce responses that are more tailored.

v. Learning and performance enhancement:

35
The chatbot algorithm can develop over time by observing how it interacts with
users. This could involve manual intervention by human operators to fine-tune
the chatbot’s responses or it could involve using machine learning algorithms to
analyze user feedback and adjust the chatbot’s responses accordingly.

A chatbot algorithm’s overall goal is to comprehend natural language, produce


appropriate responses, manage context, and learn from user interactions. A well-
designed chatbot can be a useful tool for interacting with customers, responding
to inquiries, and offering tailored support.

4.2 Algorithm of our Project:


1. Algorithm for Crop Recommendation:
Step 1: Start.
Step 2: Enter Nitrogen, Phosphorous, Potassium, ph level, Rainfall(in mm), State
and city.
Step 3: Click on Predict button.
Step 4: The user will return with which crop to be predicted with mentioned de-
tails.
Step 5: End.

2. Algorithm for Fertilizer recommendation:


Step 1: Start.
Step 2: Enter Nitrogen, Phosphorous, Potassium,State and city.
Step 3: Click on Predict button.
Step 4: The user will return with what soil precautions are needed with mentioned
details.
Step 5: End.

3. Algorithm for Government Schemes:


Step 1: Start.
Step 2: Select the government schemes already available on the portal.
Step 3: Click on View Schemes.

36
Step 4: The user can now see the amount of compensation, eligibility criteria,
documents required, and how to apply for the selected scheme.
Step 5: End.

4. Algorithm for Chatbot with ChatGPT:


Step 1: Start.
Step 2: The user can ask their doubt.
Step 3: In return, the chatbot will generated the answer.
Step 4: If the answer is not in the chatbot, the website will give the link to chat-
GPT.
Step 5: Then the user can view the link and there they can clear the doubt.
Step 6: End.

4.3 Experimental Result:

Figure 4.1: Accuracy comparision

37
Figure 4.2: Machine Learning vice Accuracy Result

4.4 Analysis of Results


”Government should provide Crop Prediction, Fertilizer Recommendation features
for Farmers”

A wide range of sophisticated modules are available on Krishikaran, a compre-


hensive web platform created especially for farmers. These modules can be used
to maximise crop production and cut costs. Krishikaran offers specialised advice
based on data analysis through its crop prediction and fertiliser recommendation
modules, assisting farmers in streamlining their farming techniques and boosting
yields. In addition, the portal provides real-time updates on the newest govern-
ment initiatives, allowing farmers to seize new possibilities as soon as they arise.
Additionally, Krishikaran includes a chatbot that uses GPT technology to give
farmers immediate access to a wealth of agricultural information and insights.
Farmers may ask questions, get advice, and receive tailored recommendations all
in real-time thanks to this sophisticated chatbot. Overall, krishikaran is a potent
tool that enables farmers to make wise decisions and utilise their resources to the
fullest extent possible for maximum output and profit.

In comparison to government farmer portals that only provide scheme details as


PDFs, Krishikaran’s crop prediction and fertiliser recommendation modules, along

38
with its live government scheme modules, offer a considerable benefit. Krishikaran
makes sure that farmers are up to date and have access to the most pertinent and
current information by offering real-time updates and suggestions on the newest
government programmes.

Additionally, Krishikaran’s Crop Prediction and Fertiliser Recommendation


Modules, which provide farmers with customised recommendations over the Gov-
ernment’s Farmer-based Portal (https://farmer.gov.in/M Aboutus.aspx) allow
them to optimise their farming practises and produce the highest crop yields.
Additionally, Krishikaran’s portal now includes a special Chatgpt Feature. Addi-
tionally, a government schemes module with official government websites has been
added.

In conclusion, Krishikaran’s advanced modules for crop prediction, fertiliser


recommendations, real-time government programme updates, and GPT-powered
chatbot offer a clear advantage over the government farmer portal. Farmers can
make informed decisions thanks to Krishikaran’s data-driven recommendations and
real-time updates, which increase yields and profits. The GPT-powered chatbot
enables farmers to better manage their resources by giving them instant access to
a wealth of agricultural knowledge and insights.

39
4.5 Testing and Analysis

Figure 4.3: Unit Testing

4.6 Comparision of the work with existing work


Both the Government Farmer Portal and the Krishikaran website were created
with farmers in mind. The characteristics and capacities of these two portals,
however, differ significantly.

40
A web portal for farmers called Krishikaran features sophisticated modules for
crop prediction, fertiliser recommendations, real-time updates on government pro-
grammes, and a chatbot powered by GPT. With the help of these features, Kr-
ishikaran is a complete platform that enables farmers to take well-informed deci-
sions and make the most use of their resources for maximum output and profit.

In contrast, the Government Farmer Portal is a more conventional site with a


module for government schemes but lacks detailed information. The portal might
offer some advice on crops and fertilisers, but it’s likely that these suggestions
won’t be particular to any one region or farmer.

One of the key advantages of Krishikaran over the Government farmer portal is the
quality and personalization of its recommendations. Krishikaran’s crop prediction
and fertiliser recommendation modules give farmers individualised advice based
on their particular locations and crops. Increased yields and profits for farmers
are possible as a result of this.

The GPT-powered chatbot, which gives farmers immediate access to a wealth


of agricultural knowledge and insights, is another benefit of Krishikaran. The
Government Farmer Portal does not have this feature, which may restrict the in-
formation and assistance that farmers can get.

The fact that Krishikaran lacks features for animal husbandry or weather updates
when compared to the government farmer-based portal with an animal husbandry
module, map view module, and weather module is a drawback. Although Kr-
ishikaran offers sophisticated crop prediction and fertiliser recommendation mod-
ules, it might not be as helpful for farmers whose primary source of income is
animal husbandry. Similar to this, the weather module of the government’s farmer
portal can be a crucial tool for farmers, giving them important updates on weather
conditions that can affect crop growth and yield. To understand the soil type and
topography of their land, farmers can also find the map view module to be useful.

41
4.7 Result

Figure 4.4: Home Page

Figure 4.5: About Page

42
Figure 4.6: Crop Prediction

Figure 4.7: Crop Prediction Result

43
Figure 4.8: Fertilizer Recommendation

Figure 4.9: Fertilizer Recommendation Result

44
Figure 4.10: Government Schemes

45
Figure 4.11: Government Individual Scheme

46
Figure 4.12: Chatgpt

Figure 4.13: Chatbot with Chatgpt

47
Chapter 5

Conclusion and Future scope

By putting our knowledge and skills to use, we are committed to creating a fully
user-friendly web portal that will be beneficial to the intended audience, Farmers.
As previously mentioned, this system has additional modules that would address
various particular problems. In the near future, a product would be created with
the intention of assisting the underserved community in resolving their problems.
After all the trials and errors have been successfully addressed, the overall perfor-
mance will be tried and tested and made available so that the Users can benefit
from, learn from, and develop in all areas while using our product.

FUTURE SCOPE: By incorporating IOT sensors into the project, we can broaden
its scope and eliminate the need for manual data entry by allowing the website to
receive input from soil tests instead.

48
Appendices

1- Install Python
pip install python

2- Install Flask
pip install Flask

3- To Install Pandas
pip isntall pandas

4- To install matplotlib
pip install matplotlib

5 -To run the project


python manage.py runserver

6- To Install sklearn
pip install sklearn

7- To Install matplotlib
pip install matplotlib

8- To Install PyTorch
pip3 install torch torchvision torchaudio

9- To Install Numpy
pip install Numpy

10- To Install Skitlearn


pip install scikit-learn

49
References

[1]. Kiran Moraye, Aruna Pavate, Suyog Nikam and Smit Thakkar - Crop Yield
Production Using Random Forest Algorithm for Major Cities in Maharashtra.
2021 International Journal of Innovative Research in Computer Science Technol-
ogy (IJIRCST).
[2]. Kumar, Y. Jeevan Nagendra and Spandana, V. and Vaishnavi, V.S. and
Neha, K. and Devi, V.G.R.R. Supervised Machine learning Approach for Crop
Yield Prediction in Agriculture Sector
[3]. Suresh, G., A. Senthil Kumar, S. Lekashri, and R. Manikandan. “Efficient
Crop Yield Recommendation System Using Machine Learning For Digital Farm-
ing”
[4]. Bondre, Devdatta A., and Santosh Mahagaonkar. ”Prediction of Crop Yield
and Fertilizer Recommendation Using Machine Learning Algorithms.” Interna-
tional Journal of Engineering Applied Sciences and Technology 4, no. 5 (2019):
371-376.
[5]. Reddy, D. Anantha, Bhagyashri Dadore, and Aarti Watekar. “Crop recom-
mendation system to maximize crop yield in ramtek region using machine learning”
[6] Devdatta A Bondre, Santosh Mahagaonkar PREDICTION OF CROP YIELD
AND FERTILIZER RECOMMENDATION USING MACHINE LEARNING AL-
GORITHMS
[7] Jeevaganesh R; Harish D; Priya B - A Machine Learning-based Approach for
Crop Yield Prediction and Fertilizer Recommendation
[8] Ramesh Medar; Vijay S. Rajpurohit; Shweta Shweta Crop Yield Prediction
using Machine Learning Techniques
[9] Dighe, Deepti, Harshada Joshi, Aishwarya Katkar, Sneha Patil, and Shrikant
Kokate. ”Survey of Crop Recommendation Systems
[10] Mahule, Ankit Arun, and A. J. Agrawal. ”Hybrid Method for Improving
Accuracy of Crop-Type Detection using Machine Learning.” International Journal

50
9, no. 2 (2020).
[11] Rajak, Rohit Kumar, Ankit Pawar, Mitalee Pendke, Pooja Shinde, Suresh
Rathod, and Avinash Devare. ”Crop recommendation system to maximize crop
yield using machine learning technique.” International Research Journal of Engi-
neering and Technology 4, no. 12 (2017): 950-953
[12] Suresh, A., P. Ganesh Kumar, and M. Ramalatha. ”Prediction of major
crop yields of Tamilnadu using K-means and Modified KNN.” In 2018 3rd In-
ternational Conference on Communication and Electronics Systems (ICCES), pp.
88-93. IEEE, 2018.
[13] Kulkarni, Nidhi H., G. N. Srinivasan, B. M. Sagar, and N. K. Cauvery.
”Improving Crop Productivity Through A Crop Recommendation System Using
Ensembling Technique.” In 2018 3rd International Conference on Computational
Systems and Information Technology for Sustainable Solutions (CSITSS), pp. 114-
119. IEEE, 2018.
[14] Mrs. N. Hemageetha, and Dr. G.M. Nasira (2016). Analysis of Soil Condition
based on pH value using Classification Techniques, IOSR-JCE, Issue 6, (pp.50-54).
[15] Doshi, Zeel, Subhash Nadkarni, Rashi Agrawal, and Neepa Shah. ”Agro-
Consultant: Intelligent Crop Recommendation System Using Machine Learning
Algorithms.”
[16] Suresh, A., P. Ganesh Kumar, and M. Ramalatha. ”Prediction of major
crop yields of Tamilnadu using K-means and Modified KNN.” In 2018 3rd In-
ternational Conference on Communication and Electronics Systems (ICCES), pp.
88-93. IEEE, 2018
[17] A Machine Learning-based Approach for Crop Yield Prediction and Fertil-
izer Recommendation Jeevaganesh R; Harish D; Priya B 2022 6th International
Conference on Trends in Electronics and Informatics (ICOEI)
[18] ML based methods XGBoost and Random Forest for Crop and Fertilizer
Prediction Premasudha B G; Thara D K; Tara K N
[19] KRISHI RAKSHAN - A Machine Learning based New Recommendation Sys-
tem to the Farmer D. N. V. S. L. S. Indira; M. Sobhana; A. H. L. Swaroop; V
Phani Kumar
[20] For Government Schemes,www.businessinsider.in
[21] For Government Schemes,www.nvshq.in

51
[22] Nitin Bhagachand Bachhav - Information Needs of the Rural Farmers : A
Study from Maharashtra, India: A Survey - University of Nebraska - Lincoln Win-
ter 12-1-2012
[23] ML based methods XGBoost and Random Forest for Crop and Fertilizer
Prediction Premasudha B G; Thara D K; Tara K N
[24] Kung, T. H. et al. Preprint at medRxiv https://doi.org/10.1101/2022.12.19.22283643
(2022).
[25] ChatGPT & Zhavoronkov, A. Oncoscience 9, 82–84 (2022)..
[26] GPT, Osmanovic Thunström, A. & Steingrimsson, S. Preprint at HAL
https://hal.science/hal-03701250 (2022).
[27] Lund B.D., Wang T. Chatting about ChatGPT: how may AI and GPT im-
pact academia and libraries?
[28] van Dis E.A., Bollen J., Zuidema W., van Rooij R., Bockting C.L. ChatGPT:
Five priorities for research
[29] Gorthi, Swathi and Huifang Dou. “PREDICTION MODELS FOR ESTIMA-
TION OF SOIL MOISTURE CONTENT.”
[30] Liu, X., Zheng, Y., Du, Z., Ding, M., Qian, Y., Yang, Z., & Tang, J. (2021).
GPT understands, too. arXiv

52
Acknowledgement

We would like to express our big thanks to our respected principal Dr Shikha
Nema for providing various facilities to carry out this project. Also, we would like
to thank our project guide Dr. Sanjay Shitole for her guidance, encouragement,
kind co-operation and suggestions given to us at progressing stages of the seminar.
We also like to thank our computer laboratory faculty for updating the terminals
to our requirements and having them available for us from time to time. Finally,
we would like to thank all of our teaching, non-teaching staff of the college for
their moral support during the course of the project work and for their direct and
indirect help in the completion of our project work.
...

Date:

Nikita Nawle(28)
Vaibhavi Parmar(32)
Dhanashree Thakur(54)

53

You might also like