/animals_or_food

Let's play a little game with CloudSight. Is it an animal or is it food?

Primary LanguageRubyMIT LicenseMIT

Animals or Food

This toy example is part of the larger [blog post] from CloudSight on the topic, originally created by the viral Twitter posts from Karen Zack.

The script used to create the example is provided below, as is the exact build environment encompassed in a docker image. Enjoy ;)

Docker

  1. Build the docker image with the provided Dockerfile
docker build -t animals_or_food .
  1. Make an env file with your credentials (for convenience and security), replacing each field in brackets with their respective values.
cat << EOF > credentials.env
CLOUDSIGHT_API_KEY=[your API key]
CLOUDSIGHT_API_SECRET=[your API secret]
EOF
  1. Run the docker container with your credentials
docker run --rm -it --env-file=credentials.env -v ${PWD}/out:/app/out animals_or_food
  1. If all goes well, you should see something like the following:
Sending 'out/tile000.jpg'
Sending 'out/tile001.jpg'
Sending 'out/tile002.jpg'
Sending 'out/tile003.jpg'
Sending 'out/tile004.jpg'
Sending 'out/tile005.jpg'
Sending 'out/tile006.jpg'
Sending 'out/tile007.jpg'
Sending 'out/tile008.jpg'
Sending 'out/tile009.jpg'
Sending 'out/tile010.jpg'
Sending 'out/tile011.jpg'
Sending 'out/tile012.jpg'
Sending 'out/tile013.jpg'
Sending 'out/tile014.jpg'
Sending 'out/tile015.jpg'
Received 'out/tile000.jpg'
Received 'out/tile001.jpg'
Received 'out/tile002.jpg'
Received 'out/tile003.jpg'
Received 'out/tile004.jpg'
Received 'out/tile005.jpg'
Received 'out/tile006.jpg'
Received 'out/tile007.jpg'
Received 'out/tile008.jpg'
Received 'out/tile009.jpg'
Received 'out/tile010.jpg'
Received 'out/tile011.jpg'
Received 'out/tile012.jpg'
Received 'out/tile013.jpg'
Received 'out/tile014.jpg'
Received 'out/tile015.jpg'
  1. Examine the responses in ./out/responses.csv