Testing the model

GCP AutoML provides a simple interface for testing the model. A new image can be uploaded from the web UI and tested against the deployed model. Here is a screenshot of the web UI demonstrating the required steps:

The model can also be tested and utilized via the REST API with the command line as well as programmatically. 

Create an image_classification_request.json file as follows:

{ "payload": { "image": { "imageBytes": "IMAGE_BYTES" } } }

Send the following request to the web service: 

curl -X POST -H "Content-Type: application/json" 
-H "Authorization: Bearer $(gcloud auth application-default print-access-token)"
https://automl.googleapis.com/v1beta1/projects/ai-gcp-ch4/locations/us-central1/models/ICN7883804797052012134:predict -d @image_classification_request.json
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.134.79.121