Skip to content

Commit 9535605

Browse files
authored
Modify serving demo to adapt windows. (#451)
1 parent 2888a93 commit 9535605

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

demo/serving/module_serving/lexical_analysis_lac/lac_serving_demo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
text_list = ["今天是个好日子", "天气预报说今天要下雨"]
88
text = {"text": text_list}
99
# 指定预测方法为lac并发送post请求
10-
url = "http://0.0.0.0:8866/predict/text/lac"
10+
url = "http://127.0.0.1:8866/predict/text/lac"
1111
r = requests.post(url=url, data=text)
1212

1313
# 打印预测结果

docs/tutorial/serving.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ $ hub serving start --config config.json
8282

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

85-
http://0.0.0.0:8866/predict/<CATEGORY\>/\<MODULE>
85+
http://127.0.0.1:8866/predict/<CATEGORY\>/\<MODULE>
8686

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

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

173173
# 打印预测结果

0 commit comments

Comments
 (0)