diff --git a/pipelines/README.md b/pipelines/README.md index 7a364026b79b..adfce57f659e 100644 --- a/pipelines/README.md +++ b/pipelines/README.md @@ -3,7 +3,7 @@ PaddleNLP Pipelines 是一个端到端智能文本产线框架,面向 NLP **全场景**,帮助用户**低门槛**构建强大**产品级系统**。
- +
更多效果展示Demo请参考 [效果展示](#效果展示) @@ -39,19 +39,19 @@ PaddleNLP Pipelines 智能文本产线库针对 NLP 部分高频场景开源了 + 语义检索
- +
+ 智能问答
- +
+ FAQ智能问答
- +
| | | diff --git a/pipelines/examples/frequently-asked-question/Install_windows.md b/pipelines/examples/FAQ/Install_windows.md similarity index 100% rename from pipelines/examples/frequently-asked-question/Install_windows.md rename to pipelines/examples/FAQ/Install_windows.md diff --git a/pipelines/examples/frequently-asked-question/README.md b/pipelines/examples/FAQ/README.md similarity index 100% rename from pipelines/examples/frequently-asked-question/README.md rename to pipelines/examples/FAQ/README.md diff --git a/pipelines/examples/frequently-asked-question/dense_faq_example.py b/pipelines/examples/FAQ/dense_faq_example.py similarity index 100% rename from pipelines/examples/frequently-asked-question/dense_faq_example.py rename to pipelines/examples/FAQ/dense_faq_example.py diff --git a/pipelines/examples/FAQ/run_faq_server.sh b/pipelines/examples/FAQ/run_faq_server.sh new file mode 100644 index 000000000000..a616ba97569e --- /dev/null +++ b/pipelines/examples/FAQ/run_faq_server.sh @@ -0,0 +1,19 @@ +# Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# 指定语义检索系统的Yaml配置文件 +export CUDA_VISIBLE_DEVICES=0 +export PIPELINE_YAML_PATH=rest_api/pipeline/dense_faq.yaml +# 使用端口号 8891 启动模型服务 +python rest_api/application.py 8891 \ No newline at end of file diff --git a/pipelines/examples/FAQ/run_faq_web.sh b/pipelines/examples/FAQ/run_faq_web.sh new file mode 100644 index 000000000000..c50be9538979 --- /dev/null +++ b/pipelines/examples/FAQ/run_faq_web.sh @@ -0,0 +1,19 @@ +# Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +unset http_proxy && unset https_proxy +# 配置模型服务地址 +export API_ENDPOINT=http://127.0.0.1:8891 +# 在指定端口 8502 启动 WebUI +python -m streamlit run ui/webapp_faq.py --server.port 8502 \ No newline at end of file diff --git a/pipelines/examples/frequently-asked-question/run_faq_server.sh b/pipelines/examples/frequently-asked-question/run_faq_server.sh deleted file mode 100644 index 1616d3731a75..000000000000 --- a/pipelines/examples/frequently-asked-question/run_faq_server.sh +++ /dev/null @@ -1,5 +0,0 @@ -# 指定语义检索系统的Yaml配置文件 -export CUDA_VISIBLE_DEVICES=0 -export PIPELINE_YAML_PATH=rest_api/pipeline/dense_faq.yaml -# 使用端口号 8891 启动模型服务 -python rest_api/application.py 8891 \ No newline at end of file diff --git a/pipelines/examples/frequently-asked-question/run_faq_web.sh b/pipelines/examples/frequently-asked-question/run_faq_web.sh deleted file mode 100644 index 718d33ec2824..000000000000 --- a/pipelines/examples/frequently-asked-question/run_faq_web.sh +++ /dev/null @@ -1,5 +0,0 @@ -unset http_proxy && unset https_proxy -# 配置模型服务地址 -export API_ENDPOINT=http://127.0.0.1:8891 -# 在指定端口 8502 启动 WebUI -python -m streamlit run ui/webapp_faq.py --server.port 8502 \ No newline at end of file