mirror of
https://github.com/RapidAI/RapidOCR.git
synced 2026-11-11 21:40:52 +08:00
make sure `model_path` is type of `Path`
This commit is contained in:
1 parent
fbaaaba486
commit
a8ea87c4cf
2 files changed
+3
-1
No files matched your search
@@ -121,6 +121,8 @@ class InferSession(abc.ABC):
|
||||
if not model_path.is_file():
|
||||
raise FileExistsError(f"{model_path} is not a file.")
|
||||
|
||||
return model_path
|
||||
|
||||
@abc.abstractmethod
|
||||
def have_key(self, key: str = "character") -> bool:
|
||||
pass
|
||||
|
||||
@@ -36,7 +36,7 @@ class TorchInferSession(InferSession):
|
||||
)
|
||||
)
|
||||
|
||||
self._verify_model(model_path)
|
||||
model_path = self._verify_model(model_path)
|
||||
|
||||
all_arch_config = OmegaConf.load(DEFAULT_CFG_PATH)
|
||||
file_name = model_path.stem
|
||||
|
||||
Reference in new issue
Block a user