File tree 2 files changed +3
-3
lines changed
demo/serving/module_serving/lexical_analysis_lac
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change 7
7
text_list = ["今天是个好日子" , "天气预报说今天要下雨" ]
8
8
text = {"text" : text_list }
9
9
# 指定预测方法为lac并发送post请求
10
- url = "http://0 .0.0.0 :8866/predict/text/lac"
10
+ url = "http://127 .0.0.1 :8866/predict/text/lac"
11
11
r = requests .post (url = url , data = text )
12
12
13
13
# 打印预测结果
Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ $ hub serving start --config config.json
82
82
83
83
在使用PaddleHub Serving部署服务端的模型预测服务后,就可以在客户端访问预测接口以获取结果了,接口url格式为:
84
84
85
- http://0 .0.0.0 :8866/predict/ <CATEGORY\> /\< MODULE>
85
+ http://127 .0.0.1 :8866/predict/ <CATEGORY\> /\< MODULE>
86
86
87
87
其中,\< CATEGORY>为text或image,与模型种类对应,\< MODULE>为模型名。
88
88
@@ -167,7 +167,7 @@ if __name__ == "__main__":
167
167
text_list = [" 今天是个好日子" , " 天气预报说今天要下雨" ]
168
168
text = {" text" : text_list}
169
169
# 指定预测方法为lac并发送post请求
170
- url = " http://0 .0.0.0 :8866/predict/text/lac"
170
+ url = " http://127 .0.0.1 :8866/predict/text/lac"
171
171
r = requests.post(url = url, data = text)
172
172
173
173
# 打印预测结果
You can’t perform that action at this time.
0 commit comments