Skip to content

Modify serving demo to adapt windows. #451

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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