@@ -488,6 +488,7 @@ def deploy(self, model_type: str, model_path: str, filename: str = "weights/best
488
488
"yolov9" ,
489
489
"yolonas" ,
490
490
"paligemma" ,
491
+ "paligemma2" ,
491
492
"yolov10" ,
492
493
"florence-2" ,
493
494
"yolov11" ,
@@ -496,14 +497,17 @@ def deploy(self, model_type: str, model_path: str, filename: str = "weights/best
496
497
if not any (supported_model in model_type for supported_model in supported_models ):
497
498
raise (ValueError (f"Model type { model_type } not supported. Supported models are" f" { supported_models } " ))
498
499
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"]) :
501
502
supported_hf_types = [
502
503
"florence-2-base" ,
503
504
"florence-2-large" ,
504
505
"paligemma-3b-pt-224" ,
505
506
"paligemma-3b-pt-448" ,
506
507
"paligemma-3b-pt-896" ,
508
+ "paligemma2-3b-pt-224" ,
509
+ "paligemma2-3b-pt-448" ,
510
+ "paligemma2-3b-pt-896" ,
507
511
]
508
512
if model_type not in supported_hf_types :
509
513
raise RuntimeError (
@@ -819,10 +823,8 @@ def __download_zip(self, link, location, format):
819
823
def bar_progress (current , total , width = 80 ):
820
824
progress_message = (
821
825
"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"
826
828
)
827
829
sys .stdout .write ("\r " + progress_message )
828
830
sys .stdout .flush ()
0 commit comments