Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion backend/src/find_api/ml/ocr.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
``korean_PP-OCRv5_mobile_rec``) rather than reintroducing ``lang``.
"""

from paddleocr import PaddleOCR
from PIL import Image
import numpy as np
from typing import List, Dict, Union
Expand Down Expand Up @@ -100,6 +99,8 @@ def _normalize_variant(variant: Union[str, None]) -> str:

def _construct(self, *, disable_onednn: bool = False):
"""Build a PaddleOCR pipeline, returning it plus whether 2.x was used."""
from paddleocr import PaddleOCR

model_names = PP_OCR_MODELS[self.variant]
extra = {"enable_mkldnn": False} if disable_onednn else {}
# PaddleOCR 3.x replaced the older use_angle_cls/use_gpu/show_log arguments
Expand Down
Loading