API
|
Authenticationfrom watson_developer_cloud import VisualRecognitionV3 visual_recognition = VisualRecognitionV3( version='{version}', iam_apikey='{apikey}' ) Classify an imageimport json from watson_developer_cloud import VisualRecognitionV3 visual_recognition = VisualRecognitionV3( '2018-03-19', iam_apikey='{iam_api_key}') with open('./fruitbowl.jpg', 'rb') as images_file: classes = visual_recognition.classify( images_file, threshold='0.6', classifier_ids='default').get_result() print(json.dumps(classes, indent=2)) |
Cheatography
https://cheatography.com
Watson IBM Cheat Sheet (DRAFT) by [deleted]
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
This is a draft cheat sheet. It is a work in progress and is not finished yet.