mirror of
https://github.com/RapidAI/RapidOCR.git
synced 2026-11-10 21:10:55 +08:00
fix: fixed issue #709
This commit is contained in:
1 parent
b64a46ffd4
commit
802c05647f
1 file changed
+25
-4
@@ -1,11 +1,32 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
# @Author: SWHL
|
||||
# @Contact: liekkaskono@163.com
|
||||
from .main import RapidOCR
|
||||
from .utils.download_models import download_models
|
||||
from .utils.load_image import LoadImageError
|
||||
from .utils.typings import EngineType, LangCls, LangDet, LangRec, ModelType, OCRVersion
|
||||
from .utils.vis_res import VisRes
|
||||
|
||||
|
||||
def __getattr__(name):
|
||||
if name == "RapidOCR":
|
||||
from .main import RapidOCR
|
||||
|
||||
return RapidOCR
|
||||
|
||||
if name == "LoadImageError":
|
||||
from .utils.load_image import LoadImageError
|
||||
|
||||
return LoadImageError
|
||||
|
||||
if name == "VisRes":
|
||||
from .utils.vis_res import VisRes
|
||||
|
||||
return VisRes
|
||||
|
||||
if name == "download_models":
|
||||
from .utils.download_models import download_models
|
||||
|
||||
return download_models
|
||||
|
||||
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
|
||||
|
||||
|
||||
__all__ = [
|
||||
"RapidOCR",
|
||||
|
||||
Reference in new issue
Block a user