mirror of
https://github.com/RapidAI/RapidOCR.git
synced 2026-11-11 13:30:51 +08:00
fix(rapidocr): fixed windows 2022Server parse int exception (#366)
This commit is contained in:
1 parent
1508d1a495
commit
0a030b9b62
1 file changed
+3
-1
@@ -151,7 +151,9 @@ class OrtInferSession(InferSession):
|
||||
)
|
||||
return False
|
||||
|
||||
cur_window_version = int(platform.release().split(".")[0])
|
||||
cur_window_version_str = platform.release().split(".")[0]
|
||||
cur_window_version = int(cur_window_version_str) if cur_window_version_str.isdigit() else 0
|
||||
|
||||
if cur_window_version < 10:
|
||||
self.logger.warning(
|
||||
"DirectML is only supported in Windows 10 and above OS. The current Windows version is %s. Use %s inference by default.",
|
||||
|
||||
Reference in new issue
Block a user