Skip to content

Commit

Permalink
Add securityStatus to ModelInfo object with default value None. (#1026)
Browse files Browse the repository at this point in the history
* Add securityStatus to ModelInfo object with default value None.

* Update src/huggingface_hub/hf_api.py

Co-authored-by: Lysandre Debut <lysandre.debut@reseau.eseo.fr>

Co-authored-by: Lysandre Debut <lysandre.debut@reseau.eseo.fr>
  • Loading branch information
Wauplin and LysandreJik authored Sep 1, 2022
1 parent c03bd29 commit 0f2c286
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/huggingface_hub/hf_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ class ModelInfo:
repo sha at this particular revision
lastModified (`str`, *optional*):
date of last commit to repo
tags (`Listr[str]`, *optional*):
tags (`List[str]`, *optional*):
List of tags.
pipeline_tag (`str`, *optional*):
Pipeline tag to identify the correct widget.
Expand All @@ -237,6 +237,9 @@ class ModelInfo:
repo author
config (`Dict`, *optional*):
Model configuration information
securityStatus (`Dict`, *optional*):
Security status of the model.
Example: `{"containsInfected": False}`
kwargs (`Dict`, *optional*):
Kwargs that will be become attributes of the class.
"""
Expand All @@ -253,6 +256,7 @@ def __init__(
private: bool = False,
author: Optional[str] = None,
config: Optional[Dict] = None,
securityStatus: Optional[Dict] = None,
**kwargs,
):
self.modelId = modelId
Expand All @@ -266,6 +270,7 @@ def __init__(
self.private = private
self.author = author
self.config = config
self.securityStatus = securityStatus
for k, v in kwargs.items():
setattr(self, k, v)

Expand Down

0 comments on commit 0f2c286

Please sign in to comment.