Deploying ML model to flask with joblib
In this blog, we will know how to deploy a Machine Learning model on a Flask App. In this blog, I am going to deploy a Simple Spam Classification Model to flask App. If you have read before about deployment of the ML model you have heard of Pickle . This is most famous library for model deployment. But the question is, Is it most suitable in every case. The answer is no. When we made a model with the sckit-learn classifiers, then Pickle faces some issues. These issues are also described in docs. But the Solution is the JOBLIB library. In this blog We will create a flask app and deploy the model in flask App with help of joblib. from here you can download pre-trained model used in this blog. Models are in output file on kaggle- https://www.kaggle.com/thedeathcure/sms-spam-filtering . Model files are present in both format - model.joblib(joblib) and model.pkl (pickle) Create app.py https://gist.github.com/maze-runnar/4b455b2b2bdb0ba45c744da55dce5160 import requests from flask impo