168
168
"spaces" ,
169
169
"tags" ,
170
170
"transformersInfo" ,
171
+ "trendingScore" ,
171
172
"widgetData" ,
172
173
]
173
174
187
188
"private" ,
188
189
"siblings" ,
189
190
"sha" ,
191
+ "trendingScore" ,
190
192
"tags" ,
191
193
]
192
194
193
195
ExpandSpaceProperty_T = Literal [
194
196
"author" ,
195
197
"cardData" ,
198
+ "createdAt" ,
196
199
"datasets" ,
197
200
"disabled" ,
198
201
"lastModified" ,
199
- "createdAt" ,
200
202
"likes" ,
203
+ "models" ,
201
204
"private" ,
202
205
"runtime" ,
203
206
"sdk" ,
204
207
"siblings" ,
205
208
"sha" ,
206
209
"subdomain" ,
207
210
"tags" ,
208
- "models " ,
211
+ "trendingScore " ,
209
212
]
210
213
211
214
USERNAME_PLACEHOLDER = "hf_user"
@@ -748,6 +751,8 @@ class ModelInfo:
748
751
Model configuration.
749
752
transformers_info (`TransformersInfo`, *optional*):
750
753
Transformers-specific info (auto class, processor, etc.) associated with the model.
754
+ trending_score (`int`, *optional*):
755
+ Trending score of the model.
751
756
card_data (`ModelCardData`, *optional*):
752
757
Model Card Metadata as a [`huggingface_hub.repocard_data.ModelCardData`] object.
753
758
siblings (`List[RepoSibling]`):
@@ -779,6 +784,7 @@ class ModelInfo:
779
784
model_index : Optional [Dict ]
780
785
config : Optional [Dict ]
781
786
transformers_info : Optional [TransformersInfo ]
787
+ trending_score : Optional [int ]
782
788
siblings : Optional [List [RepoSibling ]]
783
789
spaces : Optional [List [str ]]
784
790
safetensors : Optional [SafeTensorsInfo ]
@@ -802,6 +808,8 @@ def __init__(self, **kwargs):
802
808
self .tags = kwargs .pop ("tags" , None )
803
809
self .pipeline_tag = kwargs .pop ("pipeline_tag" , None )
804
810
self .mask_token = kwargs .pop ("mask_token" , None )
811
+ self .trending_score = kwargs .pop ("trendingScore" , None )
812
+
805
813
card_data = kwargs .pop ("cardData" , None ) or kwargs .pop ("card_data" , None )
806
814
self .card_data = (
807
815
ModelCardData (** card_data , ignore_metadata_errors = True ) if isinstance (card_data , dict ) else card_data
@@ -896,6 +904,10 @@ class DatasetInfo:
896
904
Model Card Metadata as a [`huggingface_hub.repocard_data.DatasetCardData`] object.
897
905
siblings (`List[RepoSibling]`):
898
906
List of [`huggingface_hub.hf_api.RepoSibling`] objects that constitute the dataset.
907
+ paperswithcode_id (`str`, *optional*):
908
+ Papers with code ID of the dataset.
909
+ trending_score (`int`, *optional*):
910
+ Trending score of the dataset.
899
911
"""
900
912
901
913
id : str
@@ -911,6 +923,7 @@ class DatasetInfo:
911
923
likes : Optional [int ]
912
924
paperswithcode_id : Optional [str ]
913
925
tags : Optional [List [str ]]
926
+ trending_score : Optional [int ]
914
927
card_data : Optional [DatasetCardData ]
915
928
siblings : Optional [List [RepoSibling ]]
916
929
@@ -930,6 +943,8 @@ def __init__(self, **kwargs):
930
943
self .likes = kwargs .pop ("likes" , None )
931
944
self .paperswithcode_id = kwargs .pop ("paperswithcode_id" , None )
932
945
self .tags = kwargs .pop ("tags" , None )
946
+ self .trending_score = kwargs .pop ("trendingScore" , None )
947
+
933
948
card_data = kwargs .pop ("cardData" , None ) or kwargs .pop ("card_data" , None )
934
949
self .card_data = (
935
950
DatasetCardData (** card_data , ignore_metadata_errors = True ) if isinstance (card_data , dict ) else card_data
@@ -1015,6 +1030,8 @@ class SpaceInfo:
1015
1030
List of models used by the Space.
1016
1031
datasets (`List[str]`, *optional*):
1017
1032
List of datasets used by the Space.
1033
+ trending_score (`int`, *optional*):
1034
+ Trending score of the Space.
1018
1035
"""
1019
1036
1020
1037
id : str
@@ -1031,6 +1048,7 @@ class SpaceInfo:
1031
1048
sdk : Optional [str ]
1032
1049
tags : Optional [List [str ]]
1033
1050
siblings : Optional [List [RepoSibling ]]
1051
+ trending_score : Optional [int ]
1034
1052
card_data : Optional [SpaceCardData ]
1035
1053
runtime : Optional [SpaceRuntime ]
1036
1054
models : Optional [List [str ]]
@@ -1052,6 +1070,7 @@ def __init__(self, **kwargs):
1052
1070
self .likes = kwargs .pop ("likes" , None )
1053
1071
self .sdk = kwargs .pop ("sdk" , None )
1054
1072
self .tags = kwargs .pop ("tags" , None )
1073
+ self .trending_score = kwargs .pop ("trendingScore" , None )
1055
1074
card_data = kwargs .pop ("cardData" , None ) or kwargs .pop ("card_data" , None )
1056
1075
self .card_data = (
1057
1076
SpaceCardData (** card_data , ignore_metadata_errors = True ) if isinstance (card_data , dict ) else card_data
@@ -1692,7 +1711,7 @@ def list_models(
1692
1711
expand (`List[ExpandModelProperty_T]`, *optional*):
1693
1712
List properties to return in the response. When used, only the properties in the list will be returned.
1694
1713
This parameter cannot be used if `full`, `cardData` or `fetch_config` are passed.
1695
- Possible values are `"author"`, `"baseModels"`, `"cardData"`, `"childrenModelCount"`, `"config"`, `"createdAt"`, `"disabled"`, `"downloads"`, `"downloadsAllTime"`, `"gated"`, `"inference"`, `"lastModified"`, `"library_name"`, `"likes"`, `"mask_token"`, `"model-index"`, `"pipeline_tag"`, `"private"`, `"safetensors"`, `"sha"`, `"siblings"`, `"spaces"`, `"tags"`, `"transformersInfo"` and `"widgetData"`.
1714
+ Possible values are `"author"`, `"baseModels"`, `"cardData"`, `"childrenModelCount"`, `"config"`, `"createdAt"`, `"disabled"`, `"downloads"`, `"downloadsAllTime"`, `"gated"`, `"inference"`, `"lastModified"`, `"library_name"`, `"likes"`, `"mask_token"`, `"model-index"`, `"pipeline_tag"`, `"private"`, `"safetensors"`, `"sha"`, `"siblings"`, `"spaces"`, `"tags"`, `"transformersInfo"`, `"trendingScore"` and `"widgetData"`.
1696
1715
full (`bool`, *optional*):
1697
1716
Whether to fetch all model data, including the `last_modified`,
1698
1717
the `sha`, the files and the `tags`. This is set to `True` by
@@ -1904,7 +1923,7 @@ def list_datasets(
1904
1923
expand (`List[ExpandDatasetProperty_T]`, *optional*):
1905
1924
List properties to return in the response. When used, only the properties in the list will be returned.
1906
1925
This parameter cannot be used if `full` is passed.
1907
- Possible values are `"author"`, `"cardData"`, `"citation"`, `"createdAt"`, `"disabled"`, `"description"`, `"downloads"`, `"downloadsAllTime"`, `"gated"`, `"lastModified"`, `"likes"`, `"paperswithcode_id"`, `"private"`, `"siblings"`, `"sha"` and `"tags "`.
1926
+ Possible values are `"author"`, `"cardData"`, `"citation"`, `"createdAt"`, `"disabled"`, `"description"`, `"downloads"`, `"downloadsAllTime"`, `"gated"`, `"lastModified"`, `"likes"`, `"paperswithcode_id"`, `"private"`, `"siblings"`, `"sha"`, `"tags"` and `"trendingScore "`.
1908
1927
full (`bool`, *optional*):
1909
1928
Whether to fetch all dataset data, including the `last_modified`,
1910
1929
the `card_data` and the files. Can contain useful information such as the
@@ -2087,7 +2106,7 @@ def list_spaces(
2087
2106
expand (`List[ExpandSpaceProperty_T]`, *optional*):
2088
2107
List properties to return in the response. When used, only the properties in the list will be returned.
2089
2108
This parameter cannot be used if `full` is passed.
2090
- Possible values are `"author"`, `"cardData"`, `"datasets"`, `"disabled"`, `"lastModified"`, `"createdAt"`, `"likes"`, `"private"`, `"runtime"`, `"sdk"`, `"siblings"`, `"sha"`, `"subdomain"`, `"tags"` and `"models "`.
2109
+ Possible values are `"author"`, `"cardData"`, `"datasets"`, `"disabled"`, `"lastModified"`, `"createdAt"`, `"likes"`, `"models"`, `" private"`, `"runtime"`, `"sdk"`, `"siblings"`, `"sha"`, `"subdomain"`, `"tags"` and `"trendingScore "`.
2091
2110
full (`bool`, *optional*):
2092
2111
Whether to fetch all Spaces data, including the `last_modified`, `siblings`
2093
2112
and `card_data` fields.
@@ -2404,7 +2423,7 @@ def model_info(
2404
2423
expand (`List[ExpandModelProperty_T]`, *optional*):
2405
2424
List properties to return in the response. When used, only the properties in the list will be returned.
2406
2425
This parameter cannot be used if `securityStatus` or `files_metadata` are passed.
2407
- Possible values are `"author"`, `"baseModels"`, `"cardData"`, `"childrenModelCount"`, `"config"`, `"createdAt"`, `"disabled"`, `"downloads"`, `"downloadsAllTime"`, `"gated"`, `"inference"`, `"lastModified"`, `"library_name"`, `"likes"`, `"mask_token"`, `"model-index"`, `"pipeline_tag"`, `"private"`, `"safetensors"`, `"sha"`, `"siblings"`, `"spaces"`, `"tags"`, `"transformersInfo"` and `"widgetData"`.
2426
+ Possible values are `"author"`, `"baseModels"`, `"cardData"`, `"childrenModelCount"`, `"config"`, `"createdAt"`, `"disabled"`, `"downloads"`, `"downloadsAllTime"`, `"gated"`, `"inference"`, `"lastModified"`, `"library_name"`, `"likes"`, `"mask_token"`, `"model-index"`, `"pipeline_tag"`, `"private"`, `"safetensors"`, `"sha"`, `"siblings"`, `"spaces"`, `"tags"`, `"transformersInfo"`, `"trendingScore"` and `"widgetData"`.
2408
2427
token (Union[bool, str, None], optional):
2409
2428
A valid user access token (string). Defaults to the locally saved
2410
2429
token, which is the recommended method for authentication (see
@@ -2478,7 +2497,7 @@ def dataset_info(
2478
2497
expand (`List[ExpandDatasetProperty_T]`, *optional*):
2479
2498
List properties to return in the response. When used, only the properties in the list will be returned.
2480
2499
This parameter cannot be used if `files_metadata` is passed.
2481
- Possible values are `"author"`, `"cardData"`, `"citation"`, `"createdAt"`, `"disabled"`, `"description"`, `"downloads"`, `"downloadsAllTime"`, `"gated"`, `"lastModified"`, `"likes"`, `"paperswithcode_id"`, `"private"`, `"siblings"`, `"sha"` and `"tags "`.
2500
+ Possible values are `"author"`, `"cardData"`, `"citation"`, `"createdAt"`, `"disabled"`, `"description"`, `"downloads"`, `"downloadsAllTime"`, `"gated"`, `"lastModified"`, `"likes"`, `"paperswithcode_id"`, `"private"`, `"siblings"`, `"sha"`, `"tags"` and `"trendingScore "`.
2482
2501
token (Union[bool, str, None], optional):
2483
2502
A valid user access token (string). Defaults to the locally saved
2484
2503
token, which is the recommended method for authentication (see
@@ -2551,7 +2570,7 @@ def space_info(
2551
2570
expand (`List[ExpandSpaceProperty_T]`, *optional*):
2552
2571
List properties to return in the response. When used, only the properties in the list will be returned.
2553
2572
This parameter cannot be used if `full` is passed.
2554
- Possible values are `"author"`, `"cardData"`, `"datasets"`, `"disabled"`, `"lastModified"`, `"createdAt "`, `"likes "`, `"private"`, `"runtime"`, `"sdk"`, `"siblings"`, `"sha"`, `"subdomain"`, `"tags"` and `"models "`.
2573
+ Possible values are `"author"`, `"cardData"`, `"createdAt"`, `" datasets"`, `"disabled"`, `"lastModified"`, `"likes "`, `"models "`, `"private"`, `"runtime"`, `"sdk"`, `"siblings"`, `"sha"`, `"subdomain"`, `"tags"` and `"trendingScore "`.
2555
2574
token (Union[bool, str, None], optional):
2556
2575
A valid user access token (string). Defaults to the locally saved
2557
2576
token, which is the recommended method for authentication (see
0 commit comments