Using a Vertex AI endpoint to augment a simple web deploy deployment
Earlier this year I shared a story about deploying a Keras model using preprocessing layers in a simple, Flask-based web application. In this article I will show how to adapt that solution to replace the local invocation of the model with a Vertex AI endpoint. This shows how easy it is to deploy an existing Keras model in Vertex AI and how you can use a simple web framework to exercise this deployment.
The starting point: 100% local deployment in a Flask-based web application
To recap the starting point from the previous article, the 100% local Keras web deployment looks like this:
Here are the key elements of the deployment:
- Keras model saved on the local file system
- Flask server module that loads the saved Keras model, serves the web pages, and gets predictions from the model based on what the user enters in the
home.html
page home.html
: page where the user can enter characteristics of the property for which they want to get a prediction