简体   繁体   English

IBM Watson App是否可以在Bluemix之外运行?

[英]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. 我已经在具有IBM Dev Ops服务和Jazz Hub Git的Bluemix上使用IBM Watson API部署了Apps。 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. 我想知道我们是否有可能直接使用IBM Watson工具(例如对话API工作区,Tone Analyzer,文本到语音)从VM部署应用程序,而不使用IBM Bluemix和Dev Ops。

Does anyone have deployed an app outside of bluemix with IBM Watson? 是否有人通过IBM Watson在bluemix之外部署了应用程序? Is there a possibility. 有没有可能。 ?

Yes, all of the services in the Watson Developer Cloud are REST APIs that can be used and deployed anywhere. 是的,Watson Developer Cloud中的所有服务都是REST API,可以在任何地方使用和部署。 You do not have to use any Bluemix infrastructure. 您不必使用任何Bluemix基础结构。

Yes IBM watson service can be used outside bluemix. 是的,可以在bluemix之外使用IBM watson服务。 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 :) 下面是一个Python示例,取自我看到的其他示例:)

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. 我在BlueMix上创建了服务-并收到了凭据。 This snippet can run from my laptop and connect to the Watson Discovery service. 该代码段可以从我的笔记本电脑运行,并连接到Watson Discovery服务。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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