Packaging a model for production deployment
So far in this chapter, you’ve been interacting with the models you’ve developed directly within Python by making calls to functions and methods that train a model or use a model to make a prediction. In a production environment, you won’t want to make Python calls directly. You’ll either want to create a web application that interfaces with your model, or you’ll want to use an application programming interface (API). An API allows a user to access the functions and methods they need to train and use your model without having to know how to code in Python. Building an API allows a user to call your model from their web application. To better understand this, let’s look at the parts of a model that’s running in a production environment:
Figure 13.1 – Components of a model running in a production environment
Figure 13.1 shows your model inside an API framework...