0% found this document useful (0 votes)
95 views13 pages

CROP RECOMMENDATION SYSTEM Review3

This document summarizes a crop recommendation system developed using artificial intelligence. The system imports required modules like pickle, NumPy, Pandas and Flask. It imports a dataset, splits it into training and test sets, and trains a decision tree classifier model. The trained model is then integrated into a web application using Flask. Users can input data through the web app, which will use the model to predict and recommend suitable crops.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
95 views13 pages

CROP RECOMMENDATION SYSTEM Review3

This document summarizes a crop recommendation system developed using artificial intelligence. The system imports required modules like pickle, NumPy, Pandas and Flask. It imports a dataset, splits it into training and test sets, and trains a decision tree classifier model. The trained model is then integrated into a web application using Flask. Users can input data through the web app, which will use the model to predict and recommend suitable crops.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

CROP RECOMMENDATION SYSTEM

Using
Artificial Intelligence
Under the guidance of Dr.Kareemulla Shaik

Done By :
Gadiparthi Manju Bhargavi - 19BCE7479
Chapalamadugu Gowtham - 19BCE7018
Adusumalli Rajiv - 19BCD7101
1
WORKING AND
OUTPUT OF
PROJECT
2
IMPORTING REQUIRED MODULES
FOR CODE DESIGNING AND WORKING
• We have imported some required modules to design code and to make it
work successfully

The modules are:


1. pickle:
Pickle module helps us save our model by saving it as a file so that We will later use this file to predict the output when n ew input
data is provided from our web-app.
2. NumPy and Pandas:
NumPy and Pandas modules are imported to import the dataset and perform some required operations
3. FLASK:
Flask module is imported to integrate and develop our web application
4. Sklearn:
Sklearn is imported to import ML model and it is required for performing training and testing of data
3
4
IMPORTING DATASET AND
TRAINING AND TESTING IT:
• First, Dataset is imported using pandas module by using a command called
“pd.read_csv()”
• Second, Training and testing of dataset:
• training and testing of dataset is done by importing “Sklearn module” by
using command called “train_test_split()”.
• The train_test_split() method is used to split our data into train and test sets
• Train set: The training dataset is a set of data that was utilized to fit the model.
The dataset on which the model is trained. This data is seen and learned by
the model.
• Test set: The test dataset is a subset of the training dataset that is utilized to
give an accurate evaluation of a final model fit.
• We have implemented ML algorithm called “Decision Tree Classifier” for
recommending suitable crop for farmers
5
6
• . @app.route("/") is a Python decorator that Flask provides to assign URLs in
our app to functions easily.
• Render_template() is used to integrate our web application and ML model
• Pickle module helps us save our model by saving it as a file so that We will
later use this file to predict the output when new input data is provided from
our web-app.

7
app.run() is called and the web-application is hosted locally on [localhost:5000].

“debug=True” makes sure that we don’t require to run our app every time we make changes, we can
simply refresh our web page to see the changes while the server is still running

Sample Footer Text 2/3/20XX 8


Html code

9
OUTPUT:

1
0
• By clicking URL which is
shown in below picture. That
url is directed to the web
application

1
1
1
2
1
3

You might also like