@@ -419,11 +419,13 @@ def live_plot(epochs, mAP, loss, title=""):
419419 return self .model
420420
421421 # @warn_for_wrong_dependencies_versions([("ultralytics", "==", "8.0.196")])
422- def deploy (self , model_type : str , model_path : str ) -> None :
423- """Uploads provided weights file to Roboflow
422+ def deploy (self , model_type : str , model_path : str , filename : str = "weights/best.pt" ) -> None :
423+ """Uploads provided weights file to Roboflow.
424424
425425 Args:
426- model_path (str): File path to model weights to be uploaded
426+ model_type (str): The type of the model to be deployed.
427+ model_path (str): File path to the model weights to be uploaded.
428+ filename (str, optional): The name of the weights file. Defaults to "weights/best.pt".
427429 """
428430
429431 supported_models = ["yolov5" , "yolov7-seg" , "yolov8" , "yolov9" , "yolonas" ]
@@ -457,7 +459,7 @@ def deploy(self, model_type: str, model_path: str) -> None:
457459 " Please install it with `pip install torch`"
458460 )
459461
460- model = torch .load (os .path .join (model_path , "weights/best.pt" ))
462+ model = torch .load (os .path .join (model_path , filename ))
461463
462464 if isinstance (model ["model" ].names , list ):
463465 class_names = model ["model" ].names
0 commit comments