Yes, you can use the App Engine to communicate with Google Cloud Machine Learning (hereinafter CloudML).
CloudML Python Google API, Google. App Engine, .
API , App Engine. App Engine.
, CloudML:
1.
. ( CloudML) CloudML.
API App Engine, , , quickstart. , , .
, , , GCS gcloud API, API ().
2.
( , 1) 2) - ( -).
App Engine, , - ( ).
, :
from oauth2client.client import GoogleCredentials
from googleapiclient import discovery
projectID = 'projects/<your_project_id>'
modelName = projectID+'/models/<your_model_name>'
credentials = GoogleCredentials.get_application_default()
ml = discovery.build('ml', 'v1beta1', credentials=credentials)
requestDict = {"instances":[
{"image": [0.0,..., 0.0, 0.0], "key": 0}
]}
request = ml.projects().predict(
name=modelName,
body=requestDict)
response = request.execute()
{"image": <image_array>, "key": <key_id>} , , . response, .