Fix up if "http" in ...: to be more sensible startswiths

This commit is contained in:
Aarni Koskela
2023-05-29 09:41:36 +03:00
parent 89352a2f52
commit 0afbc0c235
5 changed files with 8 additions and 8 deletions

View File

@@ -82,7 +82,7 @@ def load_models(model_path: str, model_url: str = None, command_path: str = None
def friendly_name(file: str):
if "http" in file:
if file.startswith("http"):
file = urlparse(file).path
file = os.path.basename(file)