From a2c802c30b24e3070edd4405820055ccae2db0de Mon Sep 17 00:00:00 2001 From: Jiawei Wang Date: Tue, 31 Mar 2020 15:43:38 +0800 Subject: [PATCH] Create README_CN.md --- python/examples/fit_a_line/README_CN.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 python/examples/fit_a_line/README_CN.md diff --git a/python/examples/fit_a_line/README_CN.md b/python/examples/fit_a_line/README_CN.md new file mode 100644 index 00000000..0ae611b3 --- /dev/null +++ b/python/examples/fit_a_line/README_CN.md @@ -0,0 +1,25 @@ +# 线性回归,RPC预测服务示例 + +(简体中文|[English](./README.md)) + +## 开启RPC服务端 +``` shell +sh get_data.sh +python test_server.py uci_housing_model/ +``` + +## RPC预测 +``` shell +python test_client.py uci_housing_client/serving_client_conf.prototxt +``` + +## 开启HTTP服务端 +Start a web service with default web service hosting modules +``` shell +python -m paddle_serving_server.web_serve --model uci_housing_model/ --thread 10 --name uci --port 9393 --name uci +``` + +## HTTP预测 +``` shell +curl -H "Content-Type:application/json" -X POST -d '{"x": [0.0137, -0.1136, 0.2553, -0.0692, 0.0582, -0.0727, -0.1583, -0.0584, 0.6283, 0.4919, 0.1856, 0.0795, -0.0332], "fetch":["price"]}' http://127.0.0.1:9393/uci/prediction +``` -- GitLab