@@ -425,7 +425,7 @@ def deploy(self, model_type: str, model_path: str) -> None:
425
425
model_path (str): File path to model weights to be uploaded
426
426
"""
427
427
428
- supported_models = ["yolov5" , "yolov7-seg" , "yolov8" ]
428
+ supported_models = ["yolov5" , "yolov7-seg" , "yolov8" , "yolov9" ]
429
429
430
430
if not any (supported_model in model_type for supported_model in supported_models ):
431
431
raise (ValueError (f"Model type { model_type } not supported. Supported models are" f" { supported_models } " ))
@@ -443,7 +443,7 @@ def deploy(self, model_type: str, model_path: str) -> None:
443
443
444
444
print_warn_for_wrong_dependencies_versions ([("ultralytics" , "==" , "8.0.196" )], ask_to_continue = True )
445
445
446
- elif "yolov5" in model_type or "yolov7" in model_type :
446
+ elif "yolov5" in model_type or "yolov7" in model_type or "yolov9" in model_type :
447
447
try :
448
448
import torch
449
449
except ImportError :
@@ -493,7 +493,7 @@ def deploy(self, model_type: str, model_path: str) -> None:
493
493
"ultralytics_version" : ultralytics .__version__ ,
494
494
"model_type" : model_type ,
495
495
}
496
- elif "yolov5" in model_type or "yolov7" in model_type :
496
+ elif "yolov5" in model_type or "yolov7" in model_type or "yolov9" in model_type :
497
497
# parse from yaml for yolov5
498
498
499
499
with open (os .path .join (model_path , "opt.yaml" ), "r" ) as stream :
0 commit comments