简体   繁体   中英

Does IBM Watson App works outside of Bluemix?

I've deployed Apps using IBM Watson API on Bluemix with IBM Dev Ops services and Jazz Hub Git. I was wondering if there's a possibility that we can deploy Apps from a VM directly using the IBM Watson facilities like conversation API workspace, Tone Analyzer, Text to Speech and not use IBM Bluemix and Dev Ops.

Does anyone have deployed an app outside of bluemix with IBM Watson? Is there a possibility. ?

Yes, all of the services in the Watson Developer Cloud are REST APIs that can be used and deployed anywhere. You do not have to use any Bluemix infrastructure.

Yes IBM watson service can be used outside bluemix. Just create a instance of the service you want to use and obtain its credential. Use these credential while making a call to the service.

Below is a Python example, taken from other examples I saw :)

from watson_developer_cloud import DiscoveryV1 

# SETUP ALL OF THE DISCOVERY API CREDENTIALS AND IDENTIFIERS; 
my_url= "https://gateway.watsonplatform.net/discovery/api"
my_Disc_uname= "-my-freekishglky-long-name"
my_Disc_pwd="my-random-generated-password"
my_disc_collection_id ="also from credentials after I create service"
my_disc_configuration_id = "yet-another-key"
my_disc_environment_id = "my-environment"

# FIRST  CALL TO DISCOVERY; GATHER THIS GIVES ME COOKIE AND SESSION
discovery = DiscoveryV1(
   username=my_Disc_uname,
   password=my_Disc_pwd,
   version="2016-12-01"
 )


    qopts = {
          "query": "INTERESTING STUFF",
          "count": "0",
          "filter": "yyyymmdd>20170401",
          "aggregation" : "term(docSentiment.type,count:3)"
        }

    # CALLING WATSON DISCOVERY SERVICE RIGHT HERE ...
    my_query = discovery.query(my_disc_environment_id,    my_disc_collection_id, qopts)

I created the service on BlueMix -- and received the credentials. This snippet can run from my laptop and connect to the Watson Discovery service.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM