Skip to content

Commit 4c39ce9

Browse files
authored
fix: replace deprecated openvino.runtime import (#626)
1 parent 0debb66 commit 4c39ce9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

python/rapidocr/inference_engine/openvino.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@
88

99
import numpy as np
1010
from omegaconf import DictConfig
11-
from openvino.runtime import Core
11+
try:
12+
from openvino import Core
13+
except ImportError: # fallback for older OpenVINO versions
14+
from openvino.runtime import Core
1215

1316
from ..utils.download_file import DownloadFile, DownloadFileInput
1417
from ..utils.log import logger

0 commit comments

Comments
 (0)