@@ -53,8 +53,9 @@ Paddle Serving provides HTTP and RPC based service for users to access
...
@@ -53,8 +53,9 @@ Paddle Serving provides HTTP and RPC based service for users to access
### HTTP service
### HTTP service
Paddle Serving provides a built-in python module called `paddle_serving_server.serve` that can start a rpc service or a http service with one-line command. If we specify the argument `--name uci`, it means that we will have a HTTP service with a url of `$IP:$PORT/uci/prediction`
| `name` | str | `""` | Service name, can be used to generate HTTP request url |
| `name` | str | `""` | Service name, can be used to generate HTTP request url |
| `model` | str | `""` | Path of paddle model directory to be served |
| `model` | str | `""` | Path of paddle model directory to be served |
Here, we use curl to send a HTTP POST request to the service we just started. Users can use any python library to send HTTP POST as well, e.g, [requests](https://requests.readthedocs.io/en/master/).
A user can also start a rpc service with `paddle_serving_server.serve`. RPC service is usually faster than HTTP service, although a user needs to do some coding based on Paddle Serving's python client API. Note that we do not specify `--name` here.