GoogleCloudPlatform/vision-how-happy-python

Name: vision-how-happy-python

Owner: Google Cloud Platform

Description: null

Created: 2016-07-11 21:36:34.0

Updated: 2018-02-06 19:57:00.0

Pushed: 2016-07-12 18:19:23.0

Homepage: null

Size: 16

Language: Python

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

How Happy

How Happy is a sample application demonstrating usage of Google App Engine, Google Cloud Vision, and the Google+ API. It accesses the current user's and the user's friends' Google+ profile photos, then uses Cloud Vision to analyze how happy people in the photos are.

See our other Google Cloud Platform github repos for sample applications and scaffolding for other frameworks and use cases.

Run Locally
  1. Clone this repo.

    clone https://github.com/GoogleCloudPlatform/how-happy.git
    
  2. Use the Cloud Developer Console to create a project/app id. (App id and project id are identical)

  3. Enable the Cloud Vision and Google+ APIs through the Cloud Developer Console API Manager at https://console.cloud.google.com/apis/library?project=your-app-id

  4. Create OAuth2.0 credentials for your application to use when contacting the Google+ API at https://console.cloud.google.com/apis/credentials?project=your-app-id . Include the following “Authorized redirect URIs”:

    ://localhost:8080/oauth2callback
    ://your-app-id.appspot.com/oauth2callback
    

Once created, download the JSON credentials into how-happy/app/client_secrets.json

  1. Install and setup the Google Cloud SDK.

  2. Run this project locally from the command line.

    appserver.py how-happy/
    
  3. Visit the application at http://localhost:8080.

Deploying
  1. Use gcloud to deploy your app.

    ud app deploy how-happy/app.yaml
    
  2. Congratulations! Your application is now live at your-app-id.appspot.com

Contributing changes
Licensing

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.