@@ -495,7 +495,7 @@ def deploy(self, model_type: str, model_path: str, filename: str = "weights/best
495
495
]
496
496
497
497
if not any (supported_model in model_type for supported_model in supported_models ):
498
- raise (ValueError (f"Model type { model_type } not supported. Supported models are" f" { supported_models } " ))
498
+ raise (ValueError (f"Model type { model_type } not supported. Supported models are { supported_models } " ))
499
499
500
500
if model_type .startswith (("paligemma" , "paligemma2" , "florence-2" )):
501
501
if any (model in model_type for model in ["paligemma" , "paligemma2" , "florence-2" ]):
@@ -648,7 +648,7 @@ def deploy(self, model_type: str, model_path: str, filename: str = "weights/best
648
648
)
649
649
else :
650
650
if file in ["model_artifacts.json" , "state_dict.pt" ]:
651
- raise (ValueError (f"File { file } not found. Please make sure to provide a" " valid model path." ))
651
+ raise (ValueError (f"File { file } not found. Please make sure to provide a valid model path." ))
652
652
653
653
self .upload_zip (model_type , model_path )
654
654
@@ -761,7 +761,7 @@ def deploy_yolonas(self, model_type: str, model_path: str, filename: str = "weig
761
761
)
762
762
else :
763
763
if file in ["model_artifacts.json" , filename ]:
764
- raise (ValueError (f"File { file } not found. Please make sure to provide a" " valid model path." ))
764
+ raise (ValueError (f"File { file } not found. Please make sure to provide a valid model path." ))
765
765
766
766
self .upload_zip (model_type , model_path )
767
767
@@ -791,8 +791,7 @@ def upload_zip(self, model_type: str, model_path: str, model_file_name: str = "r
791
791
792
792
if self .public :
793
793
print (
794
- "View the status of your deployment at:"
795
- f" { APP_URL } /{ self .workspace } /{ self .project } /{ self .version } "
794
+ f"View the status of your deployment at: { APP_URL } /{ self .workspace } /{ self .project } /{ self .version } "
796
795
)
797
796
print (
798
797
"Share your model with the world at:"
@@ -801,8 +800,7 @@ def upload_zip(self, model_type: str, model_path: str, model_file_name: str = "r
801
800
)
802
801
else :
803
802
print (
804
- "View the status of your deployment at:"
805
- f" { APP_URL } /{ self .workspace } /{ self .project } /{ self .version } "
803
+ f"View the status of your deployment at: { APP_URL } /{ self .workspace } /{ self .project } /{ self .version } "
806
804
)
807
805
808
806
except Exception as e :
@@ -824,7 +822,7 @@ def bar_progress(current, total, width=80):
824
822
progress_message = (
825
823
"Downloading Dataset Version Zip in "
826
824
f"{ location } to { format } : "
827
- f"{ current / total * 100 :.0f} % [{ current } / { total } ] bytes"
825
+ f"{ current / total * 100 :.0f} % [{ current } / { total } ] bytes"
828
826
)
829
827
sys .stdout .write ("\r " + progress_message )
830
828
sys .stdout .flush ()
@@ -923,7 +921,7 @@ def __get_format_identifier(self, format):
923
921
924
922
if not format :
925
923
raise RuntimeError (
926
- "You must pass a format argument to version.download() or define a" " model in your Roboflow object"
924
+ "You must pass a format argument to version.download() or define a model in your Roboflow object"
927
925
)
928
926
929
927
friendly_formats = {"yolov5" : "yolov5pytorch" , "yolov7" : "yolov7pytorch" }
0 commit comments