mpolinowski / sklearn-model-deployment

Use Flask, Docker and React.js to Deploy your SKLearn Model to the Web

Home Page:https://mpolinowski.github.io/docs/IoT-and-Machine-Learning/AIOps/2023-06-17-scikit-learn-model-deployment/2023-06-17

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Serving your SciKit Learn Model as a Prediction API

  1. Preparing the ML Model
    • Pick a SKLearn model that fits your dataset
    • Preprocess your dataset and do test trainings / hyperparameter tuning
    • Fit the model to your dataset
    • Pickle the trained model for deployment
  2. Preparing the Model API
    • Use Flask to prepare a REST API endpoint for your model
    • Test predictions using HTTP POST requests
  3. Containerizing the Application
    • Wrap the Flask application in a Docker image
  4. React.js Frontend
    • Write a React.js frontend that can interface with your REST API
  5. Serve Frontend using the Flask App
    • Use Vite.js to render the React frontend to static HTML
    • Add a static route to your Flask app to serve the frontend from inside the Docker image

Serving your SciKit Learn Model as a Prediction API

About

Use Flask, Docker and React.js to Deploy your SKLearn Model to the Web

https://mpolinowski.github.io/docs/IoT-and-Machine-Learning/AIOps/2023-06-17-scikit-learn-model-deployment/2023-06-17


Languages

Language:Jupyter Notebook 76.2%Language:JavaScript 8.9%Language:Python 5.3%Language:CSS 5.0%Language:HTML 2.4%Language:Dockerfile 2.2%