Reputation: 1444
I followed the following documentation by Google to create ML engine and I deployed my online predicator there:
https://cloud.google.com/ml-engine/docs/scikit/quickstart
Now my question is what is the simplest way I can connect my iOS application to the prepared ML engine?
Upvotes: 0
Views: 86
Reputation: 1452
You can request Online Predictions, the quickstart provides how to request online predictions by using either the gcloud tool or the python client library, but you can also use a HTTP Request to the JSON API to get the predictions by using the projects.predict method [1]:
POST https://ml.googleapis.com/v1/{name=projects/**}:predict
You just have to add your request body with your list of instances using this JSON format [2]:
{
"instances": [
<simple list>,
...
]
}
[1] https://cloud.google.com/ml-engine/reference/rest/v1/projects/predict
[2] https://cloud.google.com/ml-engine/docs/v1/predict-request#request-body
Upvotes: 1