From bc21165fd9005d971ec0c1e7572290e82f47a9df Mon Sep 17 00:00:00 2001 From: Sean Sube Date: Tue, 7 Mar 2023 23:54:32 -0600 Subject: [PATCH] fix path ref --- api/onnx_web/convert/__main__.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/api/onnx_web/convert/__main__.py b/api/onnx_web/convert/__main__.py index a0b7e1b7..a2179743 100644 --- a/api/onnx_web/convert/__main__.py +++ b/api/onnx_web/convert/__main__.py @@ -146,9 +146,11 @@ def fetch_model( ext = path.basename(url.path) _filename, ext = path.splitext(ext) if ext is not None: - cache_name += ext + cache_name = cache_path + ext + else: + cache_name = cache_path else: - cache_name = "%s.%s" % (cache_path, model_format) + cache_name = f"{cache_path}.{model_format}" if path.exists(cache_name): logger.debug("model already exists in cache, skipping fetch")