diff --git a/README.md b/README.md index 4e64ebeb80b838241ab2d038532c164a0048b828..468441f45ab5f7b099216012e5fa3abb3edb809b 100644 --- a/README.md +++ b/README.md @@ -26,14 +26,6 @@ We consider deploying deep learning inference service online to be a user-facing

-

Some Key Features

- -- Integrate with Paddle training pipeline seamlessly, most paddle models can be deployed **with one line command**. -- **Industrial serving features** supported, such as models management, online loading, online A/B testing etc. -- **Distributed Key-Value indexing** supported which is especially useful for large scale sparse features as model inputs. -- **Highly concurrent and efficient communication** between clients and servers supported. -- **Multiple programming languages** supported on client side, such as Golang, C++ and python. -- **Extensible framework design** which can support model serving beyond Paddle.

Installation

@@ -63,6 +55,70 @@ If you need install modules compiled with develop branch, please download packag Client package support Centos 7 and Ubuntu 18, or you can use HTTP service without install client. + +

Pre-built services with Paddle Serving

+ +

Chinese Word Segmentation

+ +- **Description**: +``` shell +Chinese word segmentation HTTP service that can be deployed with one line command. +``` + +- **Demo**: +``` shell +> python -m paddle_serving_app.package -get lac +> tar -xzf lac.tar.gz +> python lac_web_service.py 9292 & +> curl -H "Content-Type:application/json" -X POST -d '{"feed":[{"words": "我爱北京天安门"}], "fetch":["word_seg"]}' http://127.0.0.1:9393/lac/prediction +{"result":[{"word_seg":"我|爱|北京|天安门"}]} +``` + +

Image Classification

+ +- **Description**: +``` shell +Image classification trained with Imagenet dataset. A label and corresponding probability will be returned. +Note: This demo needs paddle-serving-server-gpu. +``` + +- **Download Servable Package**: +``` shell +wget --no-check-certificate https://paddle-serving.bj.bcebos.com/imagenet-example/imagenet_demo.tar.gz +``` +- **Host web service**: +``` shell +tar -xzf imagenet_demo.tar.gz +python image_classification_service_demo.py resnet50_serving_model +``` +- **Request sample**: + +

+
+ +
+

+ +``` shell +curl -H "Content-Type:application/json" -X POST -d '{"feed":[{"url": "https://paddle-serving.bj.bcebos.com/imagenet-example/daisy.jpg"}], "fetch": ["score"]}' http://127.0.0.1:9292/image/prediction +``` +- **Request result**: +``` shell +{"label":"daisy","prob":0.9341403245925903} +``` + + + +

Some Key Features

+ +- Integrate with Paddle training pipeline seamlessly, most paddle models can be deployed **with one line command**. +- **Industrial serving features** supported, such as models management, online loading, online A/B testing etc. +- **Distributed Key-Value indexing** supported which is especially useful for large scale sparse features as model inputs. +- **Highly concurrent and efficient communication** between clients and servers supported. +- **Multiple programming languages** supported on client side, such as Golang, C++ and python. +- **Extensible framework design** which can support model serving beyond Paddle. + +

Quick Start Example

### Boston House Price Prediction model @@ -120,66 +176,6 @@ print(fetch_map) ``` Here, `client.predict` function has two arguments. `feed` is a `python dict` with model input variable alias name and values. `fetch` assigns the prediction variables to be returned from servers. In the example, the name of `"x"` and `"price"` are assigned when the servable model is saved during training. -

Pre-built services with Paddle Serving

- -

Chinese Word Segmentation

- -- **Description**: -``` shell -Chinese word segmentation HTTP service that can be deployed with one line command. -``` - -- **Download Servable Package**: -``` shell -wget --no-check-certificate https://paddle-serving.bj.bcebos.com/lac/lac_model_jieba_web.tar.gz -``` -- **Host web service**: -``` shell -tar -xzf lac_model_jieba_web.tar.gz -python lac_web_service.py jieba_server_model/ lac_workdir 9292 -``` -- **Request sample**: -``` shell -curl -H "Content-Type:application/json" -X POST -d '{"feed":[{"words": "我爱北京天安门"}], "fetch":["word_seg"]}' http://127.0.0.1:9292/lac/prediction -``` -- **Request result**: -``` shell -{"word_seg":"我|爱|北京|天安门"} -``` - -

Image Classification

- -- **Description**: -``` shell -Image classification trained with Imagenet dataset. A label and corresponding probability will be returned. -Note: This demo needs paddle-serving-server-gpu. -``` - -- **Download Servable Package**: -``` shell -wget --no-check-certificate https://paddle-serving.bj.bcebos.com/imagenet-example/imagenet_demo.tar.gz -``` -- **Host web service**: -``` shell -tar -xzf imagenet_demo.tar.gz -python image_classification_service_demo.py resnet50_serving_model -``` -- **Request sample**: - -

-
- -
-

- -``` shell -curl -H "Content-Type:application/json" -X POST -d '{"feed":[{"url": "https://paddle-serving.bj.bcebos.com/imagenet-example/daisy.jpg"}], "fetch": ["score"]}' http://127.0.0.1:9292/image/prediction -``` -- **Request result**: -``` shell -{"label":"daisy","prob":0.9341403245925903} -``` -

More Demos

| Key | Value |