From 11d9ab6004802e186176e1fa2e59422028f41b8a Mon Sep 17 00:00:00 2001 From: Omar Sanseviero Date: Tue, 22 Jun 2021 17:19:39 +0200 Subject: [PATCH] Add config to model info (#135) --- src/huggingface_hub/hf_api.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/huggingface_hub/hf_api.py b/src/huggingface_hub/hf_api.py index 3189c625b2..c1ea0b4759 100644 --- a/src/huggingface_hub/hf_api.py +++ b/src/huggingface_hub/hf_api.py @@ -84,6 +84,7 @@ def __init__( siblings: Optional[ List[Dict] ] = None, # list of files that constitute the model + config: Optional[Dict] = None, # information about model configuration **kwargs, ): self.modelId = modelId @@ -94,6 +95,7 @@ def __init__( self.siblings = ( [ModelFile(**x) for x in siblings] if siblings is not None else None ) + self.config = config for k, v in kwargs.items(): setattr(self, k, v)