Skip to content

This directory contains samples on how to make an api call to the predict method of Google Cloud ML from a node.js application.

Notifications You must be signed in to change notification settings

jdabello/hello-ml-engine-predict

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 

Repository files navigation

Hello Cloud Machine Learning Engine from Node.js

This is a sample application that shows how to use the predict method on Cloud Machine Learning Engine to perform a prediction on a machine learning model hosted on Google Cloud ML.

Setup

Before you can run or deploy the sample, you need to do the following:

  1. Enable Google Cloud Machine Learning Engine API

  2. Install dependencies:

    With npm:

     npm install
    

    or with yarn:

     yarn install
    

Running locally

This sample uses the default authentication credentials to access Cloud ML. For that reason we need to set the project that we want to use.

  1. Use gcloud to set the property value of your active project.
gcloud config set project <MY-GCP-PROJECT>
  1. Start the application. With npm:

    npm start

or with yarn:

yarn start

Deploying to App Engine

With npm:

npm run deploy

or with yarn:

yarn run deploy

About

This directory contains samples on how to make an api call to the predict method of Google Cloud ML from a node.js application.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published