This commit is contained in:
mertalev 2025-10-15 14:35:52 -04:00
parent 5c044fb853
commit 44f90d42f8
No known key found for this signature in database
GPG key ID: DF6ABC77AAD98C95
3 changed files with 9 additions and 8 deletions

View file

@ -1,4 +1,4 @@
from typing import Iterable
from typing import Any, Iterable
import numpy as np
import numpy.typing as npt
@ -20,8 +20,8 @@ class TextRecognitionOutput(TypedDict):
# RapidOCR expects `engine_type`, `lang_type`, and `font_path` to be attributes
class OcrOptions(dict):
def __init__(self, **options):
class OcrOptions(dict[str, Any]):
def __init__(self, **options: Any) -> None:
super().__init__(**options)
self.engine_type = EngineType.ONNXRUNTIME
self.lang_type = LangRec.CH