@huggingface/tasks 0.10.17 → 0.10.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -4730,9 +4730,7 @@ var MODEL_LIBRARIES_UI_ELEMENTS = {
4730
4730
  docsUrl: "https://huggingface.co/docs/hub/adapters",
4731
4731
  snippets: adapters,
4732
4732
  filter: true,
4733
- countDownloads: {
4734
- term: { path: "adapter_config.json" }
4735
- }
4733
+ countDownloads: `path:"adapter_config.json"`
4736
4734
  },
4737
4735
  allennlp: {
4738
4736
  prettyLabel: "AllenNLP",
@@ -4749,9 +4747,7 @@ var MODEL_LIBRARIES_UI_ELEMENTS = {
4749
4747
  docsUrl: "https://huggingface.co/docs/hub/asteroid",
4750
4748
  snippets: asteroid,
4751
4749
  filter: true,
4752
- countDownloads: {
4753
- term: { path: "pytorch_model.bin" }
4754
- }
4750
+ countDownloads: `path:"pytorch_model.bin"`
4755
4751
  },
4756
4752
  audiocraft: {
4757
4753
  prettyLabel: "Audiocraft",
@@ -4765,7 +4761,7 @@ var MODEL_LIBRARIES_UI_ELEMENTS = {
4765
4761
  repoName: "audioseal",
4766
4762
  repoUrl: "https://github.com/facebookresearch/audioseal",
4767
4763
  filter: false,
4768
- countDownloads: { wildcard: { path: "*.pth" } },
4764
+ countDownloads: `path_extension:"pth"`,
4769
4765
  snippets: audioseal
4770
4766
  },
4771
4767
  bertopic: {
@@ -4780,9 +4776,7 @@ var MODEL_LIBRARIES_UI_ELEMENTS = {
4780
4776
  repoName: "big_vision",
4781
4777
  repoUrl: "https://github.com/google-research/big_vision",
4782
4778
  filter: false,
4783
- countDownloads: {
4784
- wildcard: { path: "*.npz" }
4785
- }
4779
+ countDownloads: `path_extension:"npz"`
4786
4780
  },
4787
4781
  bm25s: {
4788
4782
  prettyLabel: "BM25S",
@@ -4790,17 +4784,15 @@ var MODEL_LIBRARIES_UI_ELEMENTS = {
4790
4784
  repoUrl: "https://github.com/xhluca/bm25s",
4791
4785
  snippets: bm25s,
4792
4786
  filter: false,
4793
- countDownloads: {
4794
- term: { path: "params.index.json" }
4795
- }
4787
+ countDownloads: `path:"params.index.json"`
4796
4788
  },
4797
4789
  chat_tts: {
4798
4790
  prettyLabel: "ChatTTS",
4799
4791
  repoName: "ChatTTS",
4800
4792
  repoUrl: "https://github.com/2noise/ChatTTS.git",
4793
+ snippets: chattts,
4801
4794
  filter: false,
4802
- countDownloads: { term: { path: "asset/GPT.pt" } },
4803
- snippets: chattts
4795
+ countDownloads: `path:"asset/GPT.pt"`
4804
4796
  },
4805
4797
  diffusers: {
4806
4798
  prettyLabel: "Diffusers",
@@ -4823,18 +4815,14 @@ var MODEL_LIBRARIES_UI_ELEMENTS = {
4823
4815
  docsUrl: "https://aphp.github.io/edsnlp/latest/",
4824
4816
  filter: false,
4825
4817
  snippets: edsnlp,
4826
- countDownloads: {
4827
- wildcard: { path: "*/config.cfg" }
4828
- }
4818
+ countDownloads: `path_filename:"config" AND path_extension:"cfg"`
4829
4819
  },
4830
4820
  elm: {
4831
4821
  prettyLabel: "ELM",
4832
4822
  repoName: "elm",
4833
4823
  repoUrl: "https://github.com/slicex-ai/elm",
4834
4824
  filter: false,
4835
- countDownloads: {
4836
- wildcard: { path: "*/slicex_elm_config.json" }
4837
- }
4825
+ countDownloads: `path_filename:"slicex_elm_config" AND path_extension:"json"`
4838
4826
  },
4839
4827
  espnet: {
4840
4828
  prettyLabel: "ESPnet",
@@ -4865,9 +4853,7 @@ var MODEL_LIBRARIES_UI_ELEMENTS = {
4865
4853
  repoUrl: "https://fasttext.cc/",
4866
4854
  snippets: fasttext,
4867
4855
  filter: true,
4868
- countDownloads: {
4869
- wildcard: { path: "*.bin" }
4870
- }
4856
+ countDownloads: `path_extension:"bin"`
4871
4857
  },
4872
4858
  flair: {
4873
4859
  prettyLabel: "Flair",
@@ -4876,16 +4862,14 @@ var MODEL_LIBRARIES_UI_ELEMENTS = {
4876
4862
  docsUrl: "https://huggingface.co/docs/hub/flair",
4877
4863
  snippets: flair,
4878
4864
  filter: true,
4879
- countDownloads: {
4880
- term: { path: "pytorch_model.bin" }
4881
- }
4865
+ countDownloads: `path:"pytorch_model.bin"`
4882
4866
  },
4883
4867
  "gemma.cpp": {
4884
4868
  prettyLabel: "gemma.cpp",
4885
4869
  repoName: "gemma.cpp",
4886
4870
  repoUrl: "https://github.com/google/gemma.cpp",
4887
4871
  filter: false,
4888
- countDownloads: { wildcard: { path: "*.sbs" } }
4872
+ countDownloads: `path_extension:"sbs"`
4889
4873
  },
4890
4874
  gliner: {
4891
4875
  prettyLabel: "GLiNER",
@@ -4893,26 +4877,20 @@ var MODEL_LIBRARIES_UI_ELEMENTS = {
4893
4877
  repoUrl: "https://github.com/urchade/GLiNER",
4894
4878
  snippets: gliner,
4895
4879
  filter: false,
4896
- countDownloads: {
4897
- term: { path: "gliner_config.json" }
4898
- }
4880
+ countDownloads: `path:"gliner_config.json"`
4899
4881
  },
4900
4882
  grok: {
4901
4883
  prettyLabel: "Grok",
4902
4884
  repoName: "Grok",
4903
4885
  repoUrl: "https://github.com/xai-org/grok-1",
4904
4886
  filter: false,
4905
- countDownloads: {
4906
- terms: { path: ["ckpt/tensor00000_000", "ckpt-0/tensor00000_000"] }
4907
- }
4887
+ countDownloads: `path:"ckpt/tensor00000_000" OR path:"ckpt-0/tensor00000_000"`
4908
4888
  },
4909
4889
  "hunyuan-dit": {
4910
4890
  prettyLabel: "HunyuanDiT",
4911
4891
  repoName: "HunyuanDiT",
4912
4892
  repoUrl: "https://github.com/Tencent/HunyuanDiT",
4913
- countDownloads: {
4914
- terms: { path: ["pytorch_model_ema.pt", "pytorch_model_distill.pt"] }
4915
- }
4893
+ countDownloads: `path:"pytorch_model_ema.pt" OR path:"pytorch_model_distill.pt"`
4916
4894
  },
4917
4895
  keras: {
4918
4896
  prettyLabel: "Keras",
@@ -4921,7 +4899,7 @@ var MODEL_LIBRARIES_UI_ELEMENTS = {
4921
4899
  docsUrl: "https://huggingface.co/docs/hub/keras",
4922
4900
  snippets: keras,
4923
4901
  filter: true,
4924
- countDownloads: { term: { path: "saved_model.pb" } }
4902
+ countDownloads: `path:"saved_model.pb"`
4925
4903
  },
4926
4904
  "keras-nlp": {
4927
4905
  prettyLabel: "KerasNLP",
@@ -4947,7 +4925,7 @@ var MODEL_LIBRARIES_UI_ELEMENTS = {
4947
4925
  docsUrl: "https://huggingface.co/docs/hub/ml-agents",
4948
4926
  snippets: mlAgents,
4949
4927
  filter: true,
4950
- countDownloads: { wildcard: { path: "*.onnx" } }
4928
+ countDownloads: `path_extension:"onnx"`
4951
4929
  },
4952
4930
  mlx: {
4953
4931
  prettyLabel: "MLX",
@@ -4963,7 +4941,7 @@ var MODEL_LIBRARIES_UI_ELEMENTS = {
4963
4941
  docsUrl: "https://huggingface.co/docs/hub/mlx-image",
4964
4942
  snippets: mlxim,
4965
4943
  filter: false,
4966
- countDownloads: { term: { path: "model.safetensors" } }
4944
+ countDownloads: `path:"model.safetensors"`
4967
4945
  },
4968
4946
  nemo: {
4969
4947
  prettyLabel: "NeMo",
@@ -4971,7 +4949,7 @@ var MODEL_LIBRARIES_UI_ELEMENTS = {
4971
4949
  repoUrl: "https://github.com/NVIDIA/NeMo",
4972
4950
  snippets: nemo,
4973
4951
  filter: true,
4974
- countDownloads: { wildcard: { path: "*.nemo" } }
4952
+ countDownloads: `path_extension:"nemo" OR path:"model_config.yaml"`
4975
4953
  },
4976
4954
  open_clip: {
4977
4955
  prettyLabel: "OpenCLIP",
@@ -4979,7 +4957,7 @@ var MODEL_LIBRARIES_UI_ELEMENTS = {
4979
4957
  repoUrl: "https://github.com/mlfoundations/open_clip",
4980
4958
  snippets: open_clip,
4981
4959
  filter: true,
4982
- countDownloads: { wildcard: { path: "*pytorch_model.bin" } }
4960
+ countDownloads: `path_extension:"bin" AND path_filename:*pytorch_model`
4983
4961
  },
4984
4962
  paddlenlp: {
4985
4963
  prettyLabel: "paddlenlp",
@@ -4988,9 +4966,7 @@ var MODEL_LIBRARIES_UI_ELEMENTS = {
4988
4966
  docsUrl: "https://huggingface.co/docs/hub/paddlenlp",
4989
4967
  snippets: paddlenlp,
4990
4968
  filter: true,
4991
- countDownloads: {
4992
- term: { path: "model_config.json" }
4993
- }
4969
+ countDownloads: `path:"model_config.json"`
4994
4970
  },
4995
4971
  peft: {
4996
4972
  prettyLabel: "PEFT",
@@ -4998,9 +4974,7 @@ var MODEL_LIBRARIES_UI_ELEMENTS = {
4998
4974
  repoUrl: "https://github.com/huggingface/peft",
4999
4975
  snippets: peft,
5000
4976
  filter: true,
5001
- countDownloads: {
5002
- term: { path: "adapter_config.json" }
5003
- }
4977
+ countDownloads: `path:"adapter_config.json"`
5004
4978
  },
5005
4979
  "pyannote-audio": {
5006
4980
  prettyLabel: "pyannote.audio",
@@ -5021,7 +4995,7 @@ var MODEL_LIBRARIES_UI_ELEMENTS = {
5021
4995
  repoName: "recurrentgemma",
5022
4996
  repoUrl: "https://github.com/google-deepmind/recurrentgemma",
5023
4997
  filter: false,
5024
- countDownloads: { term: { path: "tokenizer.model" } }
4998
+ countDownloads: `path:"tokenizer.model"`
5025
4999
  },
5026
5000
  "sample-factory": {
5027
5001
  prettyLabel: "sample-factory",
@@ -5030,7 +5004,7 @@ var MODEL_LIBRARIES_UI_ELEMENTS = {
5030
5004
  docsUrl: "https://huggingface.co/docs/hub/sample-factory",
5031
5005
  snippets: sampleFactory,
5032
5006
  filter: true,
5033
- countDownloads: { term: { path: "cfg.json" } }
5007
+ countDownloads: `path:"cfg.json"`
5034
5008
  },
5035
5009
  "sentence-transformers": {
5036
5010
  prettyLabel: "sentence-transformers",
@@ -5054,9 +5028,7 @@ var MODEL_LIBRARIES_UI_ELEMENTS = {
5054
5028
  repoUrl: "https://github.com/scikit-learn/scikit-learn",
5055
5029
  snippets: sklearn,
5056
5030
  filter: true,
5057
- countDownloads: {
5058
- term: { path: "sklearn_model.joblib" }
5059
- }
5031
+ countDownloads: `path:"sklearn_model.joblib"`
5060
5032
  },
5061
5033
  spacy: {
5062
5034
  prettyLabel: "spaCy",
@@ -5065,9 +5037,7 @@ var MODEL_LIBRARIES_UI_ELEMENTS = {
5065
5037
  docsUrl: "https://huggingface.co/docs/hub/spacy",
5066
5038
  snippets: spacy,
5067
5039
  filter: true,
5068
- countDownloads: {
5069
- wildcard: { path: "*.whl" }
5070
- }
5040
+ countDownloads: `path_extension:"whl"`
5071
5041
  },
5072
5042
  "span-marker": {
5073
5043
  prettyLabel: "SpanMarker",
@@ -5084,16 +5054,14 @@ var MODEL_LIBRARIES_UI_ELEMENTS = {
5084
5054
  docsUrl: "https://huggingface.co/docs/hub/speechbrain",
5085
5055
  snippets: speechbrain,
5086
5056
  filter: true,
5087
- countDownloads: {
5088
- term: { path: "hyperparams.yaml" }
5089
- }
5057
+ countDownloads: `path:"hyperparams.yaml"`
5090
5058
  },
5091
5059
  "stable-audio-tools": {
5092
5060
  prettyLabel: "Stable Audio Tools",
5093
5061
  repoName: "stable-audio-tools",
5094
5062
  repoUrl: "https://github.com/Stability-AI/stable-audio-tools.git",
5095
5063
  filter: false,
5096
- countDownloads: { term: { path: "model.safetensors" } },
5064
+ countDownloads: `path:"model.safetensors"`,
5097
5065
  snippets: stable_audio_tools
5098
5066
  },
5099
5067
  "diffusion-single-file": {
@@ -5101,9 +5069,7 @@ var MODEL_LIBRARIES_UI_ELEMENTS = {
5101
5069
  repoName: "diffusion-single-file",
5102
5070
  repoUrl: "https://github.com/comfyanonymous/ComfyUI",
5103
5071
  filter: false,
5104
- countDownloads: {
5105
- wildcard: { path: "*.safetensors" }
5106
- }
5072
+ countDownloads: `path_extension:"safetensors"`
5107
5073
  },
5108
5074
  "stable-baselines3": {
5109
5075
  prettyLabel: "stable-baselines3",
@@ -5112,9 +5078,7 @@ var MODEL_LIBRARIES_UI_ELEMENTS = {
5112
5078
  docsUrl: "https://huggingface.co/docs/hub/stable-baselines3",
5113
5079
  snippets: stableBaselines3,
5114
5080
  filter: true,
5115
- countDownloads: {
5116
- wildcard: { path: "*.zip" }
5117
- }
5081
+ countDownloads: `path_extension:"zip"`
5118
5082
  },
5119
5083
  stanza: {
5120
5084
  prettyLabel: "Stanza",
@@ -5123,9 +5087,7 @@ var MODEL_LIBRARIES_UI_ELEMENTS = {
5123
5087
  docsUrl: "https://huggingface.co/docs/hub/stanza",
5124
5088
  snippets: stanza,
5125
5089
  filter: true,
5126
- countDownloads: {
5127
- term: { path: "models/default.zip" }
5128
- }
5090
+ countDownloads: `path:"models/default.zip"`
5129
5091
  },
5130
5092
  tensorflowtts: {
5131
5093
  prettyLabel: "TensorFlowTTS",
@@ -5138,16 +5100,14 @@ var MODEL_LIBRARIES_UI_ELEMENTS = {
5138
5100
  repoName: "TiC-CLIP",
5139
5101
  repoUrl: "https://github.com/apple/ml-tic-clip",
5140
5102
  filter: false,
5141
- countDownloads: { wildcard: { path: "checkpoints/*.pt" } }
5103
+ countDownloads: `path_extension:"pt" AND path_prefix:"checkpoints/"`
5142
5104
  },
5143
5105
  timesfm: {
5144
5106
  prettyLabel: "TimesFM",
5145
5107
  repoName: "timesfm",
5146
5108
  repoUrl: "https://github.com/google-research/timesfm",
5147
5109
  filter: false,
5148
- countDownloads: {
5149
- term: { path: "checkpoints/checkpoint_1100000/state/checkpoint" }
5150
- }
5110
+ countDownloads: `path:"checkpoints/checkpoint_1100000/state/checkpoint"`
5151
5111
  },
5152
5112
  timm: {
5153
5113
  prettyLabel: "timm",
@@ -5156,9 +5116,7 @@ var MODEL_LIBRARIES_UI_ELEMENTS = {
5156
5116
  docsUrl: "https://huggingface.co/docs/hub/timm",
5157
5117
  snippets: timm,
5158
5118
  filter: true,
5159
- countDownloads: {
5160
- terms: { path: ["pytorch_model.bin", "model.safetensors"] }
5161
- }
5119
+ countDownloads: `path:"pytorch_model.bin" OR path:"model.safetensors"`
5162
5120
  },
5163
5121
  transformers: {
5164
5122
  prettyLabel: "Transformers",
@@ -5182,9 +5140,7 @@ var MODEL_LIBRARIES_UI_ELEMENTS = {
5182
5140
  repoUrl: "https://github.com/Unity-Technologies/sentis-samples",
5183
5141
  snippets: sentis,
5184
5142
  filter: true,
5185
- countDownloads: {
5186
- wildcard: { path: "*.sentis" }
5187
- }
5143
+ countDownloads: `path_extension:"sentis"`
5188
5144
  },
5189
5145
  voicecraft: {
5190
5146
  prettyLabel: "VoiceCraft",
@@ -5197,9 +5153,7 @@ var MODEL_LIBRARIES_UI_ELEMENTS = {
5197
5153
  prettyLabel: "WhisperKit",
5198
5154
  repoName: "WhisperKit",
5199
5155
  repoUrl: "https://github.com/argmaxinc/WhisperKit",
5200
- countDownloads: {
5201
- wildcard: { path: "*/model.mil" }
5202
- }
5156
+ countDownloads: `path_filename:"model" AND path_extension:"mil" AND _exists_:"path_prefix"`
5203
5157
  }
5204
5158
  };
5205
5159
  var ALL_MODEL_LIBRARY_KEYS = Object.keys(MODEL_LIBRARIES_UI_ELEMENTS);
@@ -6,21 +6,13 @@
6
6
  * Read this doc about download stats on the Hub:
7
7
  *
8
8
  * https://huggingface.co/docs/hub/models-download-stats
9
- *
9
+ * Available fields:
10
+ * - path: the complete file path (relative) (e.g: "prefix/file.extension")
11
+ * - path_prefix: the prefix of the file path (e.g: "prefix/", empty if no prefix)
12
+ * - path_extension: the extension of the file path (e.g: "extension")
13
+ * - path_filename: the name of the file path (e.g: "file")
10
14
  * see also:
11
- * https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-bool-query.html
15
+ * https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html
12
16
  */
13
- export type ElasticBoolQueryFilter = {
14
- term?: {
15
- path: string;
16
- };
17
- } | {
18
- terms?: {
19
- path: string[];
20
- };
21
- } | {
22
- wildcard?: {
23
- path: string;
24
- };
25
- };
17
+ export type ElasticSearchQuery = string;
26
18
  //# sourceMappingURL=model-libraries-downloads.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"model-libraries-downloads.d.ts","sourceRoot":"","sources":["../../src/model-libraries-downloads.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,MAAM,MAAM,sBAAsB,GAE/B;IAAE,IAAI,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,GAE3B;IAAE,KAAK,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,EAAE,CAAA;KAAE,CAAA;CAAE,GAE9B;IAAE,QAAQ,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,CAAC"}
1
+ {"version":3,"file":"model-libraries-downloads.d.ts","sourceRoot":"","sources":["../../src/model-libraries-downloads.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC"}