A swift wrapper framework for Microsoft captionbot.ai
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
CaptionBot.xcodeproj
CaptionBot
CaptionBotExample
CaptionBotTests
.gitignore
LICENSE
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.