Coder Social home page Coder Social logo

feliperyan / pvs-node Goto Github PK

View Code? Open in Web Editor NEW

This project forked from heroku/pvs-node

0.0 2.0 0.0 5.28 MB

Salesforce Predictive Vision Service demo in Node.js

Home Page: https://image-identifier.herokuapp.com

License: MIT License

JavaScript 73.72% HTML 4.50% CSS 21.78%

pvs-node's Introduction

Salesforce Predictive Vision Image Identifier

Image Classification with the Salesforce Predictive Vision API.

🚧🚧🚧 This is a work in progress. Things are changing quickly.

Prerequisites

To use this app you will need either:

  • a Salesforce Predictive Vision Service account ID and a JWT private key, or
  • a JWT token (see: API docs)

Setup

Deploy

Manual Setup

git clone https://github.com/heroku/pvs-node.git

cd pvs-node

heroku create $app_name
heroku addons:create cloudinary:starter
heroku config:set PREDICTIVE_SERVICES_ACCOUNT_ID=$PREDICTIVE_SERVICES_ACCOUNT_ID
heroku config:set PREDICTIVE_SERVICES_PRIVATE_KEY=$PREDICTIVE_SERVICES_PRIVATE_KEY

If you provide an RSA Private Key the app takes care of authentication for you. If you don't proivde a private key you must provide a token yourself:

heroku config:set PREDICTIVE_SERVICES_TOKEN=$PREDICTIVE_SERVICES_TOKEN

The app will default to the General Image identification model supplied by the Predictive Vision Service. If you create your own model you can use it by setting the config var:

heroku config:set PREDICTIVE_VISION_MODEL_ID=$modelId

Development

Local environment

echo 'PREDICTIVE_SERVICES_TOKEN=$jwt_token' > .env

or

export PREDICTIVE_SERVICES_PRIVATE_KEY=$jwt_private_key

Dependencies

npm install
npm install --prefix react-ui

Run the Node server

heroku local

Run the React UI

React app with hot-reloading via create-react-app is served from react-ui/; automatically proxies backend requests to the local Node server.

npm start --prefix react-ui

…and in a separate terminal, start the API server:

heroku local

pvs-node's People

Contributors

trevorscott avatar mars avatar

Watchers

James Cloos avatar Felipe Ryan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.