From 5a71b4ce020228db19dd021277a4b2ffacad4251 Mon Sep 17 00:00:00 2001 From: Dong Daxiang <35550832+guru4elephant@users.noreply.github.com> Date: Wed, 4 Mar 2020 12:26:57 +0800 Subject: [PATCH] Update README.md --- README.md | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 8f3d8f45..3fc2b658 100644 --- a/README.md +++ b/README.md @@ -30,13 +30,28 @@ pip install paddle-serving-server ## Quick Start Example +#### download trained model ``` shell wget --no-check-certificate https://paddle-serving.bj.bcebos.com/uci_housing.tar.gz tar -xzf uci_housing.tar.gz +``` +Paddle Serving provides HTTP and RPC based service for users to access + +#### HTTP service + +``` shell python -m paddle_serving_server.serve --model uci_housing_model --thread 10 --port 9292 --name uci ``` +``` 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:9292/uci/prediction +``` -Python Client Request +#### RPC service + +``` shell +python -m paddle_serving_server.serve --model uci_housing_model --thread 10 --port 9292 +``` +Python client api ``` python from paddle_serving_client import Client @@ -51,8 +66,6 @@ print(fetch_map) ``` - - ## Document [Design Doc(Chinese)](doc/DESIGN.md) -- GitLab