diff --git a/python/examples/bert/README.md b/python/examples/bert/README.md index cea442c4c243e26188f02d36265dec83c036f6ec..2db288d9e107059a5fb5431af505a4faae99f379 100644 --- a/python/examples/bert/README.md +++ b/python/examples/bert/README.md @@ -11,14 +11,16 @@ This example use model [BERT Chinese Model](https://www.paddlepaddle.org.cn/hubd Install paddlehub first ``` -pip install paddlehub +pip3 install paddlehub ``` run ``` -python prepare_model.py 128 +python3 prepare_model.py 128 ``` +**PaddleHub only support Python 3.5+** + the 128 in the command above means max_seq_len in BERT model, which is the length of sample after preprocessing. the config file and model file for server side are saved in the folder bert_seq128_model. the config file generated for client side is saved in the folder bert_seq128_client. diff --git a/python/examples/bert/README_CN.md b/python/examples/bert/README_CN.md index 915194ee4b12dcae9515e67818203e22657a6952..ced5b5577b78cf5155f72024ac8b2fe585c49dc2 100644 --- a/python/examples/bert/README_CN.md +++ b/python/examples/bert/README_CN.md @@ -10,11 +10,11 @@ 示例中采用[Paddlehub](https://github.com/PaddlePaddle/PaddleHub)中的[BERT中文模型](https://www.paddlepaddle.org.cn/hubdetail?name=bert_chinese_L-12_H-768_A-12&en_category=SemanticModel)。 请先安装paddlehub ``` -pip install paddlehub +pip3 install paddlehub ``` 执行 ``` -python prepare_model.py 128 +python3 prepare_model.py 128 ``` 参数128表示BERT模型中的max_seq_len,即预处理后的样本长度。 生成server端配置文件与模型文件,存放在bert_seq128_model文件夹。 diff --git a/python/examples/pipeline/imagenet/README_CN.md b/python/examples/pipeline/imagenet/README_CN.md index ab7f63b392a391af8ca858aa8dc8f87abe3b4afa..335c96b2144b17e20d6007f376dec4416fb10aa5 100644 --- a/python/examples/pipeline/imagenet/README_CN.md +++ b/python/examples/pipeline/imagenet/README_CN.md @@ -1,6 +1,6 @@ # Imagenet Pipeline WebService -这里以 Uci 服务为例来介绍 Pipeline WebService 的使用。 +这里以 Imagenet 服务为例来介绍 Pipeline WebService 的使用。 ## 获取模型 ``` @@ -10,10 +10,11 @@ sh get_model.sh ## 启动服务 ``` -python web_service.py &>log.txt & +python resnet50_web_service.py &>log.txt & ``` ## 测试 ``` -curl -X POST -k http://localhost:18082/uci/prediction -d '{"key": ["x"], "value": ["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"]}' +python pipeline_rpc_client.py ``` +