@@ -774,6 +774,8 @@ class ModelInfo:
774774 List of spaces using the model.
775775 safetensors (`SafeTensorsInfo`, *optional*):
776776 Model's safetensors information.
777+ security_repo_status (`Dict`, *optional*):
778+ Model's security scan status.
777779 """
778780
779781 id : str
@@ -802,6 +804,7 @@ class ModelInfo:
802804 siblings : Optional [List [RepoSibling ]]
803805 spaces : Optional [List [str ]]
804806 safetensors : Optional [SafeTensorsInfo ]
807+ security_repo_status : Optional [Dict ]
805808
806809 def __init__ (self , ** kwargs ):
807810 self .id = kwargs .pop ("id" )
@@ -867,7 +870,7 @@ def __init__(self, **kwargs):
867870 if safetensors
868871 else None
869872 )
870-
873+ self . security_repo_status = kwargs . pop ( "securityRepoStatus" , None )
871874 # backwards compatibility
872875 self .lastModified = self .last_modified
873876 self .cardData = self .card_data
@@ -2489,7 +2492,7 @@ def model_info(
24892492 Whether to set a timeout for the request to the Hub.
24902493 securityStatus (`bool`, *optional*):
24912494 Whether to retrieve the security status from the model
2492- repository as well.
2495+ repository as well. The security status will be returned in the `security_repo_status` field.
24932496 files_metadata (`bool`, *optional*):
24942497 Whether or not to retrieve metadata for files in the repository
24952498 (size, LFS metadata, etc). Defaults to `False`.
0 commit comments