Solve ModuleNotFoundError: No module named 'tools.infer' (#13348) (#13603)

* add layout score return

* fix(paddleocr): correct import path for predict_system
to fix ModuleNotFoundError: No module named 'tools.infer'

* fix(paddleocr): move from tools.infer import predict_system under "tools" define to slove ModuleNotFoundError: No module named 'tools.infer'

Co-authored-by: myhloli <moe@myhloli.com>
release/2.8
Wang Xin 2024-08-29 12:00:56 +08:00 committed by GitHub
parent bf97b70977
commit 448edfedc9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -32,7 +32,6 @@ import base64
from io import BytesIO
import pprint
from PIL import Image
from tools.infer import predict_system
def _import_file(module_name, file_path, make_importable=False):
@ -63,6 +62,7 @@ from ppocr.utils.network import (
is_link,
confirm_model_dir_url,
)
from tools.infer import predict_system
from tools.infer.utility import draw_ocr, str2bool, check_gpu
from ppstructure.utility import init_args, draw_structure_result
from ppstructure.predict_system import StructureSystem, save_structure_res, to_excel