Using the API key in code

The IBM Watson Visual Recognition service comes with built-in models that you can use to analyze images for scenes, objects, faces, and many other categories without any training. We have already created an instance of the Visual Recognition service, so it is available to our project. For this to work, you need to have that valid key (our actual API key). 

Even though you have working Python code in the Watson Notebook, you need to now use your established API key with it, so it will validate with the Watson service (and actually work). 

If you look through the Python project code (which we will load in the next section), you will find the following code statement:

Visual_recognition = VisualRecognitionV3('2016-05-20', api_key='API_KEY')

This line of code is where the Watson Visual Recognition service is initialized as an object we can use within our code. You will replace the API_KEY phrase with your actual API key (the one you created in the previous section). 

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset