Skip to content

jjangsangy/AlchemyAPI

Repository files navigation

Python AlchemyAPI Client

Documentation github travis

A Pythonic interface for IBM Deep Learning with AlchemyAPI

AlchemyAPI is a text analysis and computer vision service utilizing deep learning-based artificial intelligence technologies that runs on IBM.

Quickstart Guide

Requirements

The Python library requires that you install the Requests Python module.

Install dependencies

pip install -r requirements.txt

Getting Started with the Python SDK

To get started and run the example, simply:

Installation

git clone https://github.com/jjangsangy/AlchemyAPI.git && cd AlchemyAPI
python setup.py install

Quickstart

Image Tagging

import json
import os
from alchemyapi import AlchemyAPI, Auth

API_KEY = os.environ.get("ALCHEMY_API_KEY")

auth = Auth(API_KEY)
api  = AlchemyAPI(auth)

with open('the-tree-and-the-stars.jpg', 'rb') as night_sky:
    tagging = api.interface('image_tagging', 'image', night_sky.read(), imagePostMode='raw')

json.dumps(tagging)

 {
   "status": "OK",
   "url": "http://demo1.alchemyapi.com//images/uploads/The-tree-and-the-stars.jpg",
   "totalTransactions": "4",
   "imageKeywords": [
     {
       "text": "star",
       "score": "0.999991"
     },
     {
       "text": "trail",
       "score": "0.99593"
     },
     {
       "text": "night",
       "score": "0.970688"
     },
     {
       "text": "sky",
       "score": "0.598688"
     },
     {
       "text": "star trails",
       "score": "0.524979"
     }
   ]
 }

./static/The-tree-and-the-stars.jpg

About

A Pythonic interface for IBM Deep Learning

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors