A swift wrapper framework for Microsoft captionbot.ai
Swift Objective-C
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
CaptionBot.xcodeproj
CaptionBot
CaptionBotExample
CaptionBotTests added swiftlint Oct 3, 2016
.gitignore
LICENSE Initial commit Oct 1, 2016
README.md

README.md

Carthage compatible

CaptionBot

A swift wrapper framework for Microsoft captionbot.ai

Carthage

Add 'github "noelportugal/CaptionBot"' to your Cartfile and run "carthage update"

Usage

    captionBot(url: "https://www.captionbot.ai/images/6.jpg"){ caption, error in
        if let caption = caption{
            print("Caption: \(caption)")
        }else{
            print("Error: \(error)")
        }
    }

    // Caption: I think it's a young man jumping in the air on a skateboard.

    let image = UIImage(named: "dog")!
    captionBot(image: image){ caption, error in
        if let caption = caption{
            print("Caption: \(caption)")
        }else{
            print("Error: \(error)")
        }
    }

    // Caption: I think it's a brown dog with its mouth open.