/sklearn-model-deployment

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

Primary LanguageJupyter Notebook

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