Skip to content

Instantly share code, notes, and snippets.

@austinogilvie
Last active December 18, 2015 10:29
Show Gist options
  • Select an option

  • Save austinogilvie/5768913 to your computer and use it in GitHub Desktop.

Select an option

Save austinogilvie/5768913 to your computer and use it in GitHub Desktop.
#call the api w/ some example data
# this one is a drivers license
new_image = open("dl16.jpeg", 'rb').read()
import base64
#we need to make the image JSON serializeable
new_image = base64.encodestring(new_image)
print yh.predict("imageClassifier", version=3, data=new_image)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment