Instruction for running
ML-Model-Flask-Deployment
This is the code for machine learn models using flask
Prerequisites
Scikit Learn, Pandas (for Machine Leraning Model) and Flask
Project Structure
This project has four major parts :
model.py
- contains code fot our Machine Learning modelapp.py
- contains Flask APIs that receives details through GUI or API callsrequest.py
- uses requests module to call APIs and dispalys the returned value.templates
- This folder contains the HTML template
Running the project
- Create the machine learning model
python model.py
This creates serialized version of our model into model.pkl
- Run app.py using below command
python app.py
Flask should run on port 5000.
- Navigate to http://localhost:5000
You should be able to view the homepage
Enter valid numerical values in all 3 input boxes and hit Predict.
- Can also send direct POST requests to FLask API using Python's inbuilt request module
Below command to send the request with some pre-popuated values -
python request.py