• Stars
    star
    272
  • Rank 146,107 (Top 3 %)
  • Language
    CSS
  • Created almost 5 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

ML-Model-Flask-Deployment

This is a demo project to elaborate how Machine Learn Models are deployed on production using Flask API

Prerequisites

You must have Scikit Learn, Pandas (for Machine Leraning Model) and Flask (for API) installed.

Project Structure

This project has four major parts :

  1. model.py - This contains code fot our Machine Learning model to predict employee salaries absed on trainign data in 'hiring.csv' file.
  2. app.py - This contains Flask APIs that receives employee details through GUI or API calls, computes the precited value based on our model and returns it.
  3. request.py - This uses requests module to call APIs already defined in app.py and dispalys the returned value.
  4. templates - This folder contains the HTML template to allow user to enter employee detail and displays the predicted employee salary.

Running the project

  1. Ensure that you are in the project home directory. Create the machine learning model by running below command -
python model.py

This would create a serialized version of our model into a file model.pkl

  1. Run app.py using below command to start Flask API
python app.py

By default, flask will run on port 5000.

  1. Navigate to URL http://localhost:5000

You should be able to view the homepage as below : alt text

Enter valid numerical values in all 3 input boxes and hit Predict.

If everything goes well, you should be able to see the predcited salary vaule on the HTML page! alt text

  1. You can also send direct POST requests to FLask API using Python's inbuilt request module Run the beow command to send the request with some pre-popuated values -
python request.py

More Repositories

1

6-Months-Data-Science-Roadmap-

993
star
2

Machine-Learning-in-90-days

Jupyter Notebook
942
star
3

Interview-Prepartion-Data-Science

Jupyter Notebook
678
star
4

Python-Practise-Problems

480
star
5

Data-Analyst-Skill-With-Videos-in-2021

344
star
6

Data-Analyst-Roadmap

320
star
7

Feature-Engineering-Live-sessions

Jupyter Notebook
318
star
8

Pyspark-With-Python

Jupyter Notebook
301
star
9

Advanced-House-Price-Prediction-

Jupyter Notebook
268
star
10

Car-Price-Prediction

Jupyter Notebook
203
star
11

Natural-Language-Processing

Python
201
star
12

Stock-MArket-Forecasting

Jupyter Notebook
199
star
13

EDA1

Jupyter Notebook
176
star
14

3-Months-RoadMap-For-Data-Science

164
star
15

Machine-Learning-Algorithms-Materials

Jupyter Notebook
161
star
16

Feature-Selection-techniques

Jupyter Notebook
152
star
17

Stock-Price-Prediction-using-Keras-and-Recurrent-Neural-Networ

Stock Price Prediction case study using Keras
Python
151
star
18

ARIMA-And-Seasonal-ARIMA

Jupyter Notebook
141
star
19

Malaria-Detection

Jupyter Notebook
137
star
20

Complete-Feature-Selection

Jupyter Notebook
136
star
21

Recommendation_complete_tutorial

Jupyter Notebook
129
star
22

5-Days-Live-EDA-and-Feature-Engineering

Jupyter Notebook
121
star
23

Movie-Recommender-in-python

Jupyter Notebook
119
star
24

Kaggle-Competitions

Jupyter Notebook
105
star
25

Finding-an-Outlier

Jupyter Notebook
102
star
26

Credit-Card-Fraudlent

Jupyter Notebook
101
star
27

Deep-Learning-Car-Brand

Jupyter Notebook
100
star
28

Handle-Imbalanced-Dataset

Jupyter Notebook
99
star
29

Complete-Deep-Learning

Jupyter Notebook
99
star
30

Dockers

Jupyter Notebook
99
star
31

T-test-an-Correlation-using-python

Jupyter Notebook
98
star
32

AQI-Project

Jupyter Notebook
98
star
33

mlproject

Jupyter Notebook
97
star
34

Deployment-Deep-Learning-Model

Python
96
star
35

Heroku-Demo

Python
96
star
36

All-Hyperparamter-Optimization

Jupyter Notebook
94
star
37

Flask-Web-Framework

Python
92
star
38

Data-Science-Gen-AI-Playlist-2024

91
star
39

Fake-News-Classifier

Jupyter Notebook
86
star
40

Stock-Sentiment-Analysis

Jupyter Notebook
85
star
41

Tomato-Leaf-Disease-Prediction

Jupyter Notebook
85
star
42

RegressionandLasso

Jupyter Notebook
78
star
43

Face-Recognition-Attendance-Projects

Python
77
star
44

Complete-Feature-Engineering

Jupyter Notebook
75
star
45

Predicting-Heart-Disease

Jupyter Notebook
71
star
46

Gender-Recognition-and-Age-Estimator

Python
70
star
47

Audio-Classification

Jupyter Notebook
67
star
48

Deep-Learning-Face-Recognition

Python
66
star
49

Pytorch-Tutorial

Jupyter Notebook
66
star
50

Live-Time-Series

Jupyter Notebook
66
star
51

Computer-Vision-Tutorial

Jupyter Notebook
65
star
52

Kidney-Disease-Classification-Deep-Learning-Project

Jupyter Notebook
65
star
53

Types-Of-Trnasformation

Jupyter Notebook
64
star
54

Fake-New-LSTM

Jupyter Notebook
64
star
55

Transfer-Learning

Python
63
star
56

bostonhousepricing

Jupyter Notebook
61
star
57

K-Nearest-Neighour

Jupyter Notebook
61
star
58

Diabetes-Prediction

Jupyter Notebook
60
star
59

Pipelines-Using-Sklearn

Jupyter Notebook
59
star
60

Hyperparameter-Optimization

Jupyter Notebook
59
star
61

FastAPI

Jupyter Notebook
56
star
62

Gaussian-Trnasformaion

Jupyter Notebook
55
star
63

Multiple-Linear-Regression

Python
53
star
64

Types-Of-Cross-Validation

Jupyter Notebook
52
star
65

SpamClassifier

Python
52
star
66

Time-Series-Forecasting

Jupyter Notebook
52
star
67

Trackersheet-For-Leaning-Data-Science

50
star
68

Cotton-Disease-Prediction-Deep-Learning

Jupyter Notebook
50
star
69

Principle-Component-Analysis

Jupyter Notebook
48
star
70

simple-Linear-Regression

Simple Linear implementation with python
Python
48
star
71

Complete-Deep-Learning-With-Materials

46
star
72

Huggingfacetransformer

Jupyter Notebook
45
star
73

Silhouette-clustering-

Jupyter Notebook
43
star
74

Hidden-Layers-Neurons

Jupyter Notebook
42
star
75

Dimesnsionality-Reduction

Jupyter Notebook
42
star
76

Keras-Tuner

Jupyter Notebook
42
star
77

NYC-Taxi-Fares-Prediction

Jupyter Notebook
41
star
78

AWS-SageMaker

Jupyter Notebook
40
star
79

Weather-Chatbot-Using-Luis

Python
40
star
80

Pandas-Profiling-EDA

Jupyter Notebook
40
star
81

Computer-Vision-Advanced

Jupyter Notebook
39
star
82

Google-Cloud-Platform-Deployment

CSS
39
star
83

K-NEarest-Neighbor

Jupyter Notebook
39
star
84

Autoscrapper

Jupyter Notebook
39
star
85

MediaPipe

Jupyter Notebook
38
star
86

Advanced-CNN-Architectures

Jupyter Notebook
38
star
87

Flight-Price-Prediction

Jupyter Notebook
37
star
88

Tutorials-Python-In-Hindi

Jupyter Notebook
37
star
89

DL-Project-For-Beginner

Python
36
star
90

DNA-Sequencing-Classifier

Jupyter Notebook
36
star
91

MongoDb-with-Python

Jupyter Notebook
36
star
92

Trnasformer-Bert

Jupyter Notebook
34
star
93

Types-of-Crossvalidation

Jupyter Notebook
34
star
94

Competitive-Programming

Jupyter Notebook
33
star
95

MySQL-With-Python

Jupyter Notebook
33
star
96

InsuranceFraudDetection

32
star
97

Image-Webscrapper

Python
32
star
98

Mysql-Complete-Playlist

32
star
99

IPL

Jupyter Notebook
31
star
100

stats-sessions

30
star