Skip to content

Commit

Permalink
Modify serving demo to adapt windows. (PaddlePaddle#451)
Browse files Browse the repository at this point in the history
  • Loading branch information
ShenYuhan authored Mar 17, 2020
1 parent 2888a93 commit 9535605
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
text_list = ["今天是个好日子", "天气预报说今天要下雨"]
text = {"text": text_list}
# 指定预测方法为lac并发送post请求
url = "http://0.0.0.0:8866/predict/text/lac"
url = "http://127.0.0.1:8866/predict/text/lac"
r = requests.post(url=url, data=text)

# 打印预测结果
Expand Down
4 changes: 2 additions & 2 deletions docs/tutorial/serving.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ $ hub serving start --config config.json

在使用PaddleHub Serving部署服务端的模型预测服务后,就可以在客户端访问预测接口以获取结果了,接口url格式为:

http://0.0.0.0:8866/predict/<CATEGORY\>/\<MODULE>
http://127.0.0.1:8866/predict/<CATEGORY\>/\<MODULE>

其中,\<CATEGORY>为text或image,与模型种类对应,\<MODULE>为模型名。

Expand Down Expand Up @@ -167,7 +167,7 @@ if __name__ == "__main__":
text_list = ["今天是个好日子", "天气预报说今天要下雨"]
text = {"text": text_list}
# 指定预测方法为lac并发送post请求
url = "http://0.0.0.0:8866/predict/text/lac"
url = "http://127.0.0.1:8866/predict/text/lac"
r = requests.post(url=url, data=text)

# 打印预测结果
Expand Down

0 comments on commit 9535605

Please sign in to comment.