未验证 提交 c2e45f2d 编写于 作者: Z zhoujun 提交者: GitHub

Merge pull request #5757 from WenmuZhou/whl1

[whl] add relative import 
...@@ -11,8 +11,10 @@ ...@@ -11,8 +11,10 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import paddleocr
from .paddleocr import * from .paddleocr import *
__version__ = paddleocr.VERSION __version__ = paddleocr.VERSION
__all__ = ['PaddleOCR', 'PPStructure', 'draw_ocr', 'draw_structure_result', 'save_structure_res','download_with_progressbar'] __all__ = [
'PaddleOCR', 'PPStructure', 'draw_ocr', 'draw_structure_result',
'save_structure_res', 'download_with_progressbar'
]
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
import os import os
import sys import sys
import importlib
__dir__ = os.path.dirname(__file__) __dir__ = os.path.dirname(__file__)
...@@ -26,6 +27,10 @@ import logging ...@@ -26,6 +27,10 @@ import logging
import numpy as np import numpy as np
from pathlib import Path from pathlib import Path
tools = importlib.import_module('.', 'tools')
ppocr = importlib.import_module('.', 'ppocr')
ppstructure = importlib.import_module('.', 'ppstructure')
from tools.infer import predict_system from tools.infer import predict_system
from ppocr.utils.logging import get_logger from ppocr.utils.logging import get_logger
...@@ -42,7 +47,7 @@ __all__ = [ ...@@ -42,7 +47,7 @@ __all__ = [
] ]
SUPPORT_DET_MODEL = ['DB'] SUPPORT_DET_MODEL = ['DB']
VERSION = '2.4.0.2' VERSION = '2.4.0.3'
SUPPORT_REC_MODEL = ['CRNN'] SUPPORT_REC_MODEL = ['CRNN']
BASE_DIR = os.path.expanduser("~/.paddleocr/") BASE_DIR = os.path.expanduser("~/.paddleocr/")
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册