Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Serving
提交
86340e0a
S
Serving
项目概览
PaddlePaddle
/
Serving
大约 1 年 前同步成功
通知
186
Star
833
Fork
253
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
105
列表
看板
标记
里程碑
合并请求
10
Wiki
2
Wiki
分析
仓库
DevOps
项目成员
Pages
S
Serving
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
105
Issue
105
列表
看板
标记
里程碑
合并请求
10
合并请求
10
Pages
分析
分析
仓库分析
DevOps
Wiki
2
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
86340e0a
编写于
5月 24, 2020
作者:
M
MRXLT
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix web service && fix app
上级
2aa55f14
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
12 addition
and
8 deletion
+12
-8
python/paddle_serving_app/models/model_list.py
python/paddle_serving_app/models/model_list.py
+1
-1
python/paddle_serving_app/reader/__init__.py
python/paddle_serving_app/reader/__init__.py
+5
-1
python/paddle_serving_server/serve.py
python/paddle_serving_server/serve.py
+1
-1
python/paddle_serving_server/web_service.py
python/paddle_serving_server/web_service.py
+2
-2
python/paddle_serving_server_gpu/serve.py
python/paddle_serving_server_gpu/serve.py
+1
-1
python/paddle_serving_server_gpu/web_service.py
python/paddle_serving_server_gpu/web_service.py
+2
-2
未找到文件。
python/paddle_serving_app/models/model_list.py
浏览文件 @
86340e0a
...
...
@@ -37,7 +37,7 @@ class ServingModels(object):
object_detection_url
=
"https://paddle-serving.bj.bcebos.com/paddle_hub_models/image/ObjectDetection/"
senta_url
=
"https://paddle-serving.bj.bcebos.com/paddle_hub_models/text/SentimentAnalysis/"
semantic_url
=
"https://paddle-serving.bj.bcebos.com/paddle_hub_models/text/SemanticRepresentation/"
wordseg_url
=
"https://paddle-serving.bj.bcebos.com/paddle_hub_models/text/
ChineseWordSegmentation
/"
wordseg_url
=
"https://paddle-serving.bj.bcebos.com/paddle_hub_models/text/
LexicalAnalysis
/"
self
.
url_dict
=
{}
...
...
python/paddle_serving_app/reader/__init__.py
浏览文件 @
86340e0a
...
...
@@ -11,4 +11,8 @@
# 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.
from
.image_reader
import
ImageReader
,
File2Image
,
URL2Image
,
Sequential
,
Normalize
,
CenterCrop
,
Resize
,
Transpose
,
Div
,
RGB2BGR
,
BGR2RGB
,
RCNNPostprocess
,
SegPostprocess
,
PadStride
from
.chinese_bert_reader
import
ChineseBertReader
from
.image_reader
import
ImageReader
,
File2Image
,
URL2Image
,
Sequential
,
Normalize
,
CenterCrop
,
Resize
,
PadStride
from
.lac_reader
import
LACReader
from
.senta_reader
import
SentaReader
from
.imdb_reader
import
IMDBDataset
python/paddle_serving_server/serve.py
浏览文件 @
86340e0a
...
...
@@ -103,7 +103,7 @@ if __name__ == "__main__":
service
.
load_model_config
(
args
.
model
)
service
.
prepare_server
(
workdir
=
args
.
workdir
,
port
=
args
.
port
,
device
=
args
.
device
)
service
.
run_
server
()
service
.
run_
rpc_service
()
app_instance
=
Flask
(
__name__
)
...
...
python/paddle_serving_server/web_service.py
浏览文件 @
86340e0a
...
...
@@ -92,7 +92,7 @@ class WebService(object):
result
=
{
"result"
:
"Request Value Error"
}
return
result
def
run_
server
(
self
):
def
run_
rpc_service
(
self
):
import
socket
localIP
=
socket
.
gethostbyname
(
socket
.
gethostname
())
print
(
"web service address:"
)
...
...
@@ -115,7 +115,7 @@ class WebService(object):
self
.
app_instance
=
app_instance
def
run_
flask
(
self
):
def
run_
web_service
(
self
):
self
.
app_instance
.
run
(
host
=
"0.0.0.0"
,
port
=
self
.
port
,
threaded
=
False
,
...
...
python/paddle_serving_server_gpu/serve.py
浏览文件 @
86340e0a
...
...
@@ -118,7 +118,7 @@ if __name__ == "__main__":
web_service
.
set_gpus
(
gpu_ids
)
web_service
.
prepare_server
(
workdir
=
args
.
workdir
,
port
=
args
.
port
,
device
=
args
.
device
)
web_service
.
run_
server
()
web_service
.
run_
rpc_service
()
app_instance
=
Flask
(
__name__
)
...
...
python/paddle_serving_server_gpu/web_service.py
浏览文件 @
86340e0a
...
...
@@ -138,7 +138,7 @@ class WebService(object):
result
=
{
"result"
:
"Request Value Error"
}
return
result
def
run_
server
(
self
):
def
run_
rpc_service
(
self
):
import
socket
localIP
=
socket
.
gethostbyname
(
socket
.
gethostname
())
print
(
"web service address:"
)
...
...
@@ -165,7 +165,7 @@ class WebService(object):
self
.
app_instance
=
app_instance
def
run_
flask
(
self
):
def
run_
web_service
(
self
):
self
.
app_instance
.
run
(
host
=
"0.0.0.0"
,
port
=
self
.
port
,
threaded
=
False
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录