Change os.path to pathlib Path (#6737)

Change os.path to pathlib
This commit is contained in:
Stephen
2024-01-27 23:54:13 -05:00
committed by GitHub
parent 8581d9bce4
commit 5b1b80a5b6
+1 -1
View File
@@ -172,7 +172,7 @@ class OnnxRuntimeModel:
# load model from local directory
if os.path.isdir(model_id):
model = OnnxRuntimeModel.load_model(
os.path.join(model_id, model_file_name), provider=provider, sess_options=sess_options
Path(model_id, model_file_name).as_posix(), provider=provider, sess_options=sess_options
)
kwargs["model_save_dir"] = Path(model_id)
# load model from hub