From 6ee188f6512be96a9acc70d1d1d75efd153af4ae Mon Sep 17 00:00:00 2001 From: wangjiawei04 Date: Tue, 11 Aug 2020 23:58:32 +0800 Subject: [PATCH] fix codesytle --- python/examples/ocr/det_debugger_server.py | 5 +++-- python/examples/ocr/det_web_server.py | 3 ++- python/examples/ocr/ocr_web_server.py | 3 ++- python/examples/ocr/rec_web_server.py | 3 ++- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/python/examples/ocr/det_debugger_server.py b/python/examples/ocr/det_debugger_server.py index 78970af4..913a0bb4 100644 --- a/python/examples/ocr/det_debugger_server.py +++ b/python/examples/ocr/det_debugger_server.py @@ -23,7 +23,7 @@ from paddle_serving_app.reader import Div, Normalize, Transpose from paddle_serving_app.reader import DBPostProcess, FilterBoxes if sys.argv[1] == 'gpu': from paddle_serving_server_gpu.web_service import WebService -elif sys.argv[1] == 'cpu' +elif sys.argv[1] == 'cpu': from paddle_serving_server.web_service import WebService import time import re @@ -69,7 +69,8 @@ ocr_service = OCRService(name="ocr") ocr_service.load_model_config("ocr_det_model") if sys.argv[1] == 'gpu': ocr_service.set_gpus("0") - ocr_service.prepare_server(workdir="workdir", port=9292, device="gpu", gpuid=0) + ocr_service.prepare_server( + workdir="workdir", port=9292, device="gpu", gpuid=0) elif sys.argv[1] == 'cpu': ocr_service.prepare_server(workdir="workdir", port=9292) ocr_service.init_det() diff --git a/python/examples/ocr/det_web_server.py b/python/examples/ocr/det_web_server.py index 14be7413..38c6541c 100644 --- a/python/examples/ocr/det_web_server.py +++ b/python/examples/ocr/det_web_server.py @@ -70,7 +70,8 @@ ocr_service = OCRService(name="ocr") ocr_service.load_model_config("ocr_det_model") if sys.argv[1] == 'gpu': ocr_service.set_gpus("0") - ocr_service.prepare_server(workdir="workdir", port=9292, device="gpu", gpuid=0) + ocr_service.prepare_server( + workdir="workdir", port=9292, device="gpu", gpuid=0) elif sys.argv[1] == 'cpu': ocr_service.prepare_server(workdir="workdir", port=9292, device="cpu") ocr_service.init_det() diff --git a/python/examples/ocr/ocr_web_server.py b/python/examples/ocr/ocr_web_server.py index 6c0de446..de83ca94 100644 --- a/python/examples/ocr/ocr_web_server.py +++ b/python/examples/ocr/ocr_web_server.py @@ -95,7 +95,8 @@ ocr_service = OCRService(name="ocr") ocr_service.load_model_config("ocr_rec_model") if sys.argv[1] == 'gpu': ocr_service.set_gpus("0") - ocr_service.prepare_server(workdir="workdir", port=9292, device="gpu", gpuid=0) + ocr_service.prepare_server( + workdir="workdir", port=9292, device="gpu", gpuid=0) elif sys.argv[1] == 'cpu': ocr_service.prepare_server(workdir="workdir", port=9292) ocr_service.init_det_client( diff --git a/python/examples/ocr/rec_web_server.py b/python/examples/ocr/rec_web_server.py index 0f4e9f6d..aae97fd9 100644 --- a/python/examples/ocr/rec_web_server.py +++ b/python/examples/ocr/rec_web_server.py @@ -70,7 +70,8 @@ ocr_service.load_model_config("ocr_rec_model") ocr_service.init_rec() if sys.argv[1] == 'gpu': ocr_service.set_gpus("0") - ocr_service.prepare_server(workdir="workdir", port=9292, device="gpu", gpuid=0) + ocr_service.prepare_server( + workdir="workdir", port=9292, device="gpu", gpuid=0) elif sys.argv[1] == 'cpu': ocr_service.prepare_server(workdir="workdir", port=9292, device="cpu") ocr_service.run_rpc_service() -- GitLab