Baby Weight Prediction Example
Disclaimer: This is not an official Google product.
This is an example application demonstrating how the deployed model can be used to make online predictions from web applications.
You are supposed to have deployed the trained model for online predictions by following the instruction in the Cloud Datalab notebook. You need to use the same project to run this application.
Do this first
In this section you will start your Google Cloud Shell and clone the application code repository to it.
Click the Google Cloud Shell icon in the top-right and wait for your shell to open:
- Clone the lab repository in your cloud shell, then
cdinto that dir:
$ git clone https://github.com/GoogleCloudPlatform/training-data-analyst Cloning into 'training-data-analyst'... ... $ cd training-data-analyst/blogs/babyweight/application
Customize the model name
If you have deployed the model with the name different from 'babyweight',
app.yaml with a text editor and replace the model name accordingly.
env_variables: MODEL_NAME: 'babyweight'
Deploy the application
$ pip install -r requirements.txt -t lib $ gcloud app create $ gcloud app deploy
By executing these commands on the Cloud Shell, the project id is automatically
applied to the application and the application URL will be
Now you can access the URL from your browser to use the web application to predict a baby's weight.