README.md 652 字节
Newer Older
Z
zhangjun 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
# Fit a line prediction example

([简体中文](./README_CN.md)|English)

## Get data

```shell
sh get_data.sh
```



## RPC service

### Start server
Z
zhangjun 已提交
16 17 18 19
``` shell
python test_server.py uci_housing_model/
```
You can alse use the following code to start the RPC service 
Z
zhangjun 已提交
20
```shell
Z
zhangjun 已提交
21
python -m paddle_serving_server.serve --model uci_housing_model --thread 10 --port 9393 --use_lite --use_xpu --ir_optim
Z
zhangjun 已提交
22 23 24 25 26 27 28 29 30 31
```

### Client prediction

The `paddlepaddle` package is used in `test_client.py`, and you may need to download the corresponding package(`pip install paddlepaddle`).

``` shell
python test_client.py uci_housing_client/serving_client_conf.prototxt
```