captionbot

1.0.2 • Public • Published

captionbot Build Status

Get captions for image using Microsoft's CaptionBot šŸ¤–

šŸ¤– I think it's a dog in the snow.

Install

$ npm install --save captionbot

Usage

constĀ captionbotĀ =Ā require('captionbot');
Ā 
captionbot('http://imgur.com/B7a15F5.jpg');
Ā Ā Ā Ā .then(captionĀ =>Ā {
Ā Ā Ā Ā Ā Ā Ā Ā console.log(caption);
Ā Ā Ā Ā })
Ā 
//=>Ā 'IĀ thinkĀ it'sĀ aĀ dogĀ inĀ theĀ snow.'

API

captionbot(imageUrl)

imageUrl

Type: string

Url to the image. Must be on a public server that Microsoft's servers can download to determine the caption.

Returns a promise for the caption.

Notes

  • Requires Node 4 or newer.
  • Powered by CaptionBot, a free service provided by Microsoft.
  • If you like this, you can read more at https://www.microsoft.com/cognitive-services.
  • This node module was not created by Microsoft.
  • I would consider this module "for testing only" - I do not recommend using in a production system.
  • Microsoft: I made this because I am a fan of the technology. If there are any problems, or you want to use this package name, I'm happy to discuss.

License

MIT Ā© Dylan Greene

Install

npm i captionbot

DownloadsWeekly Downloads

2

Version

1.0.2

License

MIT

Last publish

Collaborators

  • dylang