This post talks on how to host your trained machine learning model as a REST API so that we can use the model for prediction. This post considers python Flask for building REST endpoint and docker for containerizing.

Prerequisites

You need knowledge of the following:

  1. Python
  2. Machine Learning
  3. Scikit-Learn
  4. REST API
  5. Docker

Table of contents

  1. Why we need REST API for ML model?
  2. Create a Machine Learning model using SKLearn
  3. Package the model in to pickle file
  4. Create FLASK API
  5. Create a docker image
  6. Run the container locally
  7. Use REST end-point for prediction

1. Why we need REST API for ML model?

Once we train our machine learning model, we want the model…

Naga Durga Sreenivasulu kedari

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store