@@ -488,6 +488,7 @@ def deploy(self, model_type: str, model_path: str, filename: str = "weights/best
488488 "yolov9" ,
489489 "yolonas" ,
490490 "paligemma" ,
491+ "paligemma2" ,
491492 "yolov10" ,
492493 "florence-2" ,
493494 "yolov11" ,
@@ -496,14 +497,17 @@ def deploy(self, model_type: str, model_path: str, filename: str = "weights/best
496497 if not any (supported_model in model_type for supported_model in supported_models ):
497498 raise (ValueError (f"Model type { model_type } not supported. Supported models are" f" { supported_models } " ))
498499
499- if model_type .startswith (("paligemma" , "florence-2" )):
500- if "paligemma" in model_type or " florence-2" in model_type :
500+ if model_type .startswith (("paligemma" , "paligemma2" , " florence-2" )):
501+ if any ( model in model_type for model in [ "paligemma" , "paligemma2" , " florence-2"]) :
501502 supported_hf_types = [
502503 "florence-2-base" ,
503504 "florence-2-large" ,
504505 "paligemma-3b-pt-224" ,
505506 "paligemma-3b-pt-448" ,
506507 "paligemma-3b-pt-896" ,
508+ "paligemma2-3b-pt-224" ,
509+ "paligemma2-3b-pt-448" ,
510+ "paligemma2-3b-pt-896" ,
507511 ]
508512 if model_type not in supported_hf_types :
509513 raise RuntimeError (
@@ -819,10 +823,8 @@ def __download_zip(self, link, location, format):
819823 def bar_progress (current , total , width = 80 ):
820824 progress_message = (
821825 "Downloading Dataset Version Zip in "
822- + location
823- + " to "
824- + format
825- + ": %d%% [%d / %d] bytes" % (current / total * 100 , current , total )
826+ f"{ location } to { format } : "
827+ f"{ current / total * 100 :.0f} % [{ current } / { total } ] bytes"
826828 )
827829 sys .stdout .write ("\r " + progress_message )
828830 sys .stdout .flush ()
0 commit comments