diff --git a/python/examples/fit_a_line/README.md b/python/examples/fit_a_line/README.md index da0ec8f3564577c76134325c4d943a8fecaeaa55..24bd0363794104226218b83ab9817bc14481e35c 100644 --- a/python/examples/fit_a_line/README.md +++ b/python/examples/fit_a_line/README.md @@ -1,22 +1,25 @@ # Fit a line example, prediction through rpc service -Start rpc service + +([简体中文](./README_CN.md)|English) + +## Start rpc service ``` shell sh get_data.sh python test_server.py uci_housing_model/ ``` -Prediction +## Prediction ``` shell python test_client.py uci_housing_client/serving_client_conf.prototxt ``` -# prediction through http service +## prediction through http service 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 ``` -Prediction through http post +## Prediction through http post ``` 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 ```