Skip to content

Instantly share code, notes, and snippets.

@nickjacob
Last active August 29, 2015 14:03
Show Gist options
  • Save nickjacob/5044eaf1c76c8cd79641 to your computer and use it in GitHub Desktop.
Save nickjacob/5044eaf1c76c8cd79641 to your computer and use it in GitHub Desktop.
mirador api usage example
require 'mirador'
mc = Mirador::Client.new('your_key_here')
mc.classify_files('bathing-suit.jpg', 'nsfw-user-upload.png').each do |result|
puts "#{ result.name }: #{ (result.safe and 'is' or 'is not' } safe"
end
mc.classify_urls('http://possibly-nsfw.com/cool.png').each do |result|
puts "#{ result.name }: #{ (result.safe and 'is' or 'is not' } safe"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment