Skip to content

Commit

Permalink
Solve ModuleNotFoundError: No module named 'tools.infer' (#13348) (#1…
Browse files Browse the repository at this point in the history
…3603)

* 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 <[email protected]>
  • Loading branch information
GreatV and myhloli authored Aug 29, 2024
1 parent bf97b70 commit 448edfe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion paddleocr.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
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):
Expand Down Expand Up @@ -63,6 +62,7 @@ def _import_file(module_name, file_path, make_importable=False):
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
Expand Down

0 comments on commit 448edfe

Please sign in to comment.