From 94faae6ccaaefdda2e5e417e6af7308a27bdc9af Mon Sep 17 00:00:00 2001 From: littletomatodonkey Date: Tue, 27 Oct 2020 12:58:51 +0000 Subject: [PATCH] fix export --- deploy/hubserving/ocr_det/module.py | 4 +--- deploy/hubserving/ocr_rec/module.py | 4 +--- deploy/hubserving/ocr_system/module.py | 5 +---- deploy/hubserving/readme.md | 8 +------- deploy/hubserving/readme_en.md | 10 ++-------- 5 files changed, 6 insertions(+), 25 deletions(-) diff --git a/deploy/hubserving/ocr_det/module.py b/deploy/hubserving/ocr_det/module.py index 7c11d1fa..d2cecaa4 100644 --- a/deploy/hubserving/ocr_det/module.py +++ b/deploy/hubserving/ocr_det/module.py @@ -5,9 +5,7 @@ from __future__ import print_function import os import sys -__dir__ = os.path.dirname(os.path.abspath(__file__)) -sys.path.append(__dir__) -sys.path.append(os.path.abspath(os.path.join(__dir__, '../../../'))) +sys.path.insert(0, ".") import argparse import ast diff --git a/deploy/hubserving/ocr_rec/module.py b/deploy/hubserving/ocr_rec/module.py index 781214f9..e2d0bfdd 100644 --- a/deploy/hubserving/ocr_rec/module.py +++ b/deploy/hubserving/ocr_rec/module.py @@ -5,9 +5,7 @@ from __future__ import print_function import os import sys -__dir__ = os.path.dirname(os.path.abspath(__file__)) -sys.path.append(__dir__) -sys.path.append(os.path.abspath(os.path.join(__dir__, '../../../'))) +sys.path.insert(0, ".") import argparse import ast diff --git a/deploy/hubserving/ocr_system/module.py b/deploy/hubserving/ocr_system/module.py index f2a4ed99..a959fc0e 100644 --- a/deploy/hubserving/ocr_system/module.py +++ b/deploy/hubserving/ocr_system/module.py @@ -5,10 +5,7 @@ from __future__ import print_function import os import sys - -__dir__ = os.path.dirname(os.path.abspath(__file__)) -sys.path.append(__dir__) -sys.path.append(os.path.abspath(os.path.join(__dir__, '../../../'))) +sys.path.insert(0, ".") import argparse import ast diff --git a/deploy/hubserving/readme.md b/deploy/hubserving/readme.md index c7068d91..56217a9c 100644 --- a/deploy/hubserving/readme.md +++ b/deploy/hubserving/readme.md @@ -1,7 +1,7 @@ [English](readme_en.md) | 简体中文 PaddleOCR提供2种服务部署方式: -- 基于PaddleHub Serving的部署:代码路径为"`./deploy/hubserving`",按照本教程使用; +- 基于PaddleHub Serving的部署:代码路径为"`./deploy/hubserving`",按照本教程使用; - 基于PaddleServing的部署:代码路径为"`./deploy/pdserving`",使用方法参考[文档](../pdserving/readme.md)。 # 基于PaddleHub Serving的服务部署 @@ -29,12 +29,6 @@ deploy/hubserving/ocr_system/ ```shell # 安装paddlehub pip3 install paddlehub --upgrade -i https://pypi.tuna.tsinghua.edu.cn/simple - -# 在Linux下设置环境变量 -export PYTHONPATH=. - -# 或者,在Windows下设置环境变量 -SET PYTHONPATH=. ``` ### 2. 下载推理模型 diff --git a/deploy/hubserving/readme_en.md b/deploy/hubserving/readme_en.md index 48b519ae..f41fb3f6 100644 --- a/deploy/hubserving/readme_en.md +++ b/deploy/hubserving/readme_en.md @@ -1,7 +1,7 @@ English | [简体中文](readme.md) -PaddleOCR provides 2 service deployment methods: -- Based on **PaddleHub Serving**: Code path is "`./deploy/hubserving`". Please follow this tutorial. +PaddleOCR provides 2 service deployment methods: +- Based on **PaddleHub Serving**: Code path is "`./deploy/hubserving`". Please follow this tutorial. - Based on **PaddleServing**: Code path is "`./deploy/pdserving`". Please refer to the [tutorial](../pdserving/readme_en.md) for usage. # Service deployment based on PaddleHub Serving @@ -30,12 +30,6 @@ The following steps take the 2-stage series service as an example. If only the d ```shell # Install paddlehub pip3 install paddlehub --upgrade -i https://pypi.tuna.tsinghua.edu.cn/simple - -# Set environment variables on Linux -export PYTHONPATH=. - -# Set environment variables on Windows -SET PYTHONPATH=. ``` ### 2. Download inference model -- GitLab