Skip to content

Takes an image of a celebrity, finds a quote by them, then places the quote on the image.

Notifications You must be signed in to change notification settings

snex/quote_machine

Repository files navigation

quote_machine

Takes an image of a celebrity, finds a quote by them, then places the quote on the image.

Installation

bundle install

Note that RMagick and Nokogiri are required, so you may need to follow the installation instructions associated with them, as they require compilation.

Running

Before you run the application, you will need credentials for the following APIs:

https://www.microsoft.com/cognitive-services/en-us/computer-vision-api

http://www.alchemyapi.com/api/sentiment-analysis

Once you have keys for these APIs, copy creds_example.yml over to creds.yml and put the keys in that file. You can then run the app with: ruby main.rb

This will spin up a Sinatra server that you can hit on the following URL:

http://localhost:4567/

From there, just paste the URL of a celebrity image, select the quote type you want, and watch the magic happen!

Notes

Since Alchemy's free version has a strict rate limit, I am only grabbing the first quote for a given celebrity no matter what. To score the full list of quotes and properly sort on them, uncomment https://github.com/snex/quote_machine/blob/master/brainy_quote.rb#L15

About

Takes an image of a celebrity, finds a quote by them, then places the quote on the image.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published