@huggingface/tasks 0.10.16 → 0.10.18

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.cjs CHANGED
@@ -4168,6 +4168,24 @@ var asteroid = (model) => [
4168
4168
 
4169
4169
  model = BaseModel.from_pretrained("${model.id}")`
4170
4170
  ];
4171
+ var audioseal = (model) => {
4172
+ const watermarkSnippet = `# Watermark Generator
4173
+ from audioseal import AudioSeal
4174
+
4175
+ model = AudioSeal.load_generator("${model.id}")
4176
+ # pass a tensor (tensor_wav) of shape (batch, channels, samples) and a sample rate
4177
+ wav, sr = tensor_wav, 16000
4178
+
4179
+ watermark = model.get_watermark(wav, sr)
4180
+ watermarked_audio = wav + watermark`;
4181
+ const detectorSnippet = `# Watermark Detector
4182
+ from audioseal import AudioSeal
4183
+
4184
+ detector = AudioSeal.load_detector("${model.id}")
4185
+
4186
+ result, message = detector.detect_watermark(watermarked_audio, sr)`;
4187
+ return [watermarkSnippet, detectorSnippet];
4188
+ };
4171
4189
  function get_base_diffusers_model(model) {
4172
4190
  return model.cardData?.base_model?.toString() ?? "fill-in-base-model";
4173
4191
  }
@@ -4751,9 +4769,7 @@ var MODEL_LIBRARIES_UI_ELEMENTS = {
4751
4769
  docsUrl: "https://huggingface.co/docs/hub/adapters",
4752
4770
  snippets: adapters,
4753
4771
  filter: true,
4754
- countDownloads: {
4755
- term: { path: "adapter_config.json" }
4756
- }
4772
+ countDownloads: `path:"adapter_config.json"`
4757
4773
  },
4758
4774
  allennlp: {
4759
4775
  prettyLabel: "AllenNLP",
@@ -4770,9 +4786,7 @@ var MODEL_LIBRARIES_UI_ELEMENTS = {
4770
4786
  docsUrl: "https://huggingface.co/docs/hub/asteroid",
4771
4787
  snippets: asteroid,
4772
4788
  filter: true,
4773
- countDownloads: {
4774
- term: { path: "pytorch_model.bin" }
4775
- }
4789
+ countDownloads: `path:"pytorch_model.bin"`
4776
4790
  },
4777
4791
  audiocraft: {
4778
4792
  prettyLabel: "Audiocraft",
@@ -4781,6 +4795,14 @@ var MODEL_LIBRARIES_UI_ELEMENTS = {
4781
4795
  snippets: audiocraft,
4782
4796
  filter: false
4783
4797
  },
4798
+ audioseal: {
4799
+ prettyLabel: "AudioSeal",
4800
+ repoName: "audioseal",
4801
+ repoUrl: "https://github.com/facebookresearch/audioseal",
4802
+ filter: false,
4803
+ countDownloads: "path_extension:pt",
4804
+ snippets: audioseal
4805
+ },
4784
4806
  bertopic: {
4785
4807
  prettyLabel: "BERTopic",
4786
4808
  repoName: "BERTopic",
@@ -4793,9 +4815,7 @@ var MODEL_LIBRARIES_UI_ELEMENTS = {
4793
4815
  repoName: "big_vision",
4794
4816
  repoUrl: "https://github.com/google-research/big_vision",
4795
4817
  filter: false,
4796
- countDownloads: {
4797
- wildcard: { path: "*.npz" }
4798
- }
4818
+ countDownloads: `path_extension:"npz"`
4799
4819
  },
4800
4820
  bm25s: {
4801
4821
  prettyLabel: "BM25S",
@@ -4803,17 +4823,15 @@ var MODEL_LIBRARIES_UI_ELEMENTS = {
4803
4823
  repoUrl: "https://github.com/xhluca/bm25s",
4804
4824
  snippets: bm25s,
4805
4825
  filter: false,
4806
- countDownloads: {
4807
- term: { path: "params.index.json" }
4808
- }
4826
+ countDownloads: `path:"params.index.json"`
4809
4827
  },
4810
4828
  chat_tts: {
4811
4829
  prettyLabel: "ChatTTS",
4812
4830
  repoName: "ChatTTS",
4813
4831
  repoUrl: "https://github.com/2noise/ChatTTS.git",
4832
+ snippets: chattts,
4814
4833
  filter: false,
4815
- countDownloads: { term: { path: "asset/GPT.pt" } },
4816
- snippets: chattts
4834
+ countDownloads: `path:"asset/GPT.pt"`
4817
4835
  },
4818
4836
  diffusers: {
4819
4837
  prettyLabel: "Diffusers",
@@ -4836,18 +4854,14 @@ var MODEL_LIBRARIES_UI_ELEMENTS = {
4836
4854
  docsUrl: "https://aphp.github.io/edsnlp/latest/",
4837
4855
  filter: false,
4838
4856
  snippets: edsnlp,
4839
- countDownloads: {
4840
- wildcard: { path: "*/config.cfg" }
4841
- }
4857
+ countDownloads: `path_filename:"config" AND path_extension:"cfg"`
4842
4858
  },
4843
4859
  elm: {
4844
4860
  prettyLabel: "ELM",
4845
4861
  repoName: "elm",
4846
4862
  repoUrl: "https://github.com/slicex-ai/elm",
4847
4863
  filter: false,
4848
- countDownloads: {
4849
- wildcard: { path: "*/slicex_elm_config.json" }
4850
- }
4864
+ countDownloads: `path_filename:"slicex_elm_config" AND path_extension:"json"`
4851
4865
  },
4852
4866
  espnet: {
4853
4867
  prettyLabel: "ESPnet",
@@ -4878,9 +4892,7 @@ var MODEL_LIBRARIES_UI_ELEMENTS = {
4878
4892
  repoUrl: "https://fasttext.cc/",
4879
4893
  snippets: fasttext,
4880
4894
  filter: true,
4881
- countDownloads: {
4882
- wildcard: { path: "*.bin" }
4883
- }
4895
+ countDownloads: `path_extension:"bin"`
4884
4896
  },
4885
4897
  flair: {
4886
4898
  prettyLabel: "Flair",
@@ -4889,16 +4901,14 @@ var MODEL_LIBRARIES_UI_ELEMENTS = {
4889
4901
  docsUrl: "https://huggingface.co/docs/hub/flair",
4890
4902
  snippets: flair,
4891
4903
  filter: true,
4892
- countDownloads: {
4893
- term: { path: "pytorch_model.bin" }
4894
- }
4904
+ countDownloads: `path:"pytorch_model.bin"`
4895
4905
  },
4896
4906
  "gemma.cpp": {
4897
4907
  prettyLabel: "gemma.cpp",
4898
4908
  repoName: "gemma.cpp",
4899
4909
  repoUrl: "https://github.com/google/gemma.cpp",
4900
4910
  filter: false,
4901
- countDownloads: { wildcard: { path: "*.sbs" } }
4911
+ countDownloads: `path_extension:"sbs"`
4902
4912
  },
4903
4913
  gliner: {
4904
4914
  prettyLabel: "GLiNER",
@@ -4906,26 +4916,20 @@ var MODEL_LIBRARIES_UI_ELEMENTS = {
4906
4916
  repoUrl: "https://github.com/urchade/GLiNER",
4907
4917
  snippets: gliner,
4908
4918
  filter: false,
4909
- countDownloads: {
4910
- term: { path: "gliner_config.json" }
4911
- }
4919
+ countDownloads: `path:"gliner_config.json"`
4912
4920
  },
4913
4921
  grok: {
4914
4922
  prettyLabel: "Grok",
4915
4923
  repoName: "Grok",
4916
4924
  repoUrl: "https://github.com/xai-org/grok-1",
4917
4925
  filter: false,
4918
- countDownloads: {
4919
- terms: { path: ["ckpt/tensor00000_000", "ckpt-0/tensor00000_000"] }
4920
- }
4926
+ countDownloads: `path:"ckpt/tensor00000_000" OR path:"ckpt-0/tensor00000_000"`
4921
4927
  },
4922
4928
  "hunyuan-dit": {
4923
4929
  prettyLabel: "HunyuanDiT",
4924
4930
  repoName: "HunyuanDiT",
4925
4931
  repoUrl: "https://github.com/Tencent/HunyuanDiT",
4926
- countDownloads: {
4927
- terms: { path: ["pytorch_model_ema.pt", "pytorch_model_distill.pt"] }
4928
- }
4932
+ countDownloads: `path:"pytorch_model_ema.pt" OR path:"pytorch_model_distill.pt"`
4929
4933
  },
4930
4934
  keras: {
4931
4935
  prettyLabel: "Keras",
@@ -4934,7 +4938,7 @@ var MODEL_LIBRARIES_UI_ELEMENTS = {
4934
4938
  docsUrl: "https://huggingface.co/docs/hub/keras",
4935
4939
  snippets: keras,
4936
4940
  filter: true,
4937
- countDownloads: { term: { path: "saved_model.pb" } }
4941
+ countDownloads: `path:"saved_model.pb"`
4938
4942
  },
4939
4943
  "keras-nlp": {
4940
4944
  prettyLabel: "KerasNLP",
@@ -4960,7 +4964,7 @@ var MODEL_LIBRARIES_UI_ELEMENTS = {
4960
4964
  docsUrl: "https://huggingface.co/docs/hub/ml-agents",
4961
4965
  snippets: mlAgents,
4962
4966
  filter: true,
4963
- countDownloads: { wildcard: { path: "*.onnx" } }
4967
+ countDownloads: `path_extension:"onnx"`
4964
4968
  },
4965
4969
  mlx: {
4966
4970
  prettyLabel: "MLX",
@@ -4976,7 +4980,7 @@ var MODEL_LIBRARIES_UI_ELEMENTS = {
4976
4980
  docsUrl: "https://huggingface.co/docs/hub/mlx-image",
4977
4981
  snippets: mlxim,
4978
4982
  filter: false,
4979
- countDownloads: { term: { path: "model.safetensors" } }
4983
+ countDownloads: `path:"model.safetensors"`
4980
4984
  },
4981
4985
  nemo: {
4982
4986
  prettyLabel: "NeMo",
@@ -4984,7 +4988,7 @@ var MODEL_LIBRARIES_UI_ELEMENTS = {
4984
4988
  repoUrl: "https://github.com/NVIDIA/NeMo",
4985
4989
  snippets: nemo,
4986
4990
  filter: true,
4987
- countDownloads: { wildcard: { path: "*.nemo" } }
4991
+ countDownloads: `path_extension:"nemo" OR path:"model_config.yaml"`
4988
4992
  },
4989
4993
  open_clip: {
4990
4994
  prettyLabel: "OpenCLIP",
@@ -4992,7 +4996,7 @@ var MODEL_LIBRARIES_UI_ELEMENTS = {
4992
4996
  repoUrl: "https://github.com/mlfoundations/open_clip",
4993
4997
  snippets: open_clip,
4994
4998
  filter: true,
4995
- countDownloads: { wildcard: { path: "*pytorch_model.bin" } }
4999
+ countDownloads: `path_extension:"bin" AND path_filename:*pytorch_model`
4996
5000
  },
4997
5001
  paddlenlp: {
4998
5002
  prettyLabel: "paddlenlp",
@@ -5001,9 +5005,7 @@ var MODEL_LIBRARIES_UI_ELEMENTS = {
5001
5005
  docsUrl: "https://huggingface.co/docs/hub/paddlenlp",
5002
5006
  snippets: paddlenlp,
5003
5007
  filter: true,
5004
- countDownloads: {
5005
- term: { path: "model_config.json" }
5006
- }
5008
+ countDownloads: `path:"model_config.json"`
5007
5009
  },
5008
5010
  peft: {
5009
5011
  prettyLabel: "PEFT",
@@ -5011,9 +5013,7 @@ var MODEL_LIBRARIES_UI_ELEMENTS = {
5011
5013
  repoUrl: "https://github.com/huggingface/peft",
5012
5014
  snippets: peft,
5013
5015
  filter: true,
5014
- countDownloads: {
5015
- term: { path: "adapter_config.json" }
5016
- }
5016
+ countDownloads: `path:"adapter_config.json"`
5017
5017
  },
5018
5018
  "pyannote-audio": {
5019
5019
  prettyLabel: "pyannote.audio",
@@ -5034,7 +5034,7 @@ var MODEL_LIBRARIES_UI_ELEMENTS = {
5034
5034
  repoName: "recurrentgemma",
5035
5035
  repoUrl: "https://github.com/google-deepmind/recurrentgemma",
5036
5036
  filter: false,
5037
- countDownloads: { term: { path: "tokenizer.model" } }
5037
+ countDownloads: `path:"tokenizer.model"`
5038
5038
  },
5039
5039
  "sample-factory": {
5040
5040
  prettyLabel: "sample-factory",
@@ -5043,7 +5043,7 @@ var MODEL_LIBRARIES_UI_ELEMENTS = {
5043
5043
  docsUrl: "https://huggingface.co/docs/hub/sample-factory",
5044
5044
  snippets: sampleFactory,
5045
5045
  filter: true,
5046
- countDownloads: { term: { path: "cfg.json" } }
5046
+ countDownloads: `path:"cfg.json"`
5047
5047
  },
5048
5048
  "sentence-transformers": {
5049
5049
  prettyLabel: "sentence-transformers",
@@ -5067,9 +5067,7 @@ var MODEL_LIBRARIES_UI_ELEMENTS = {
5067
5067
  repoUrl: "https://github.com/scikit-learn/scikit-learn",
5068
5068
  snippets: sklearn,
5069
5069
  filter: true,
5070
- countDownloads: {
5071
- term: { path: "sklearn_model.joblib" }
5072
- }
5070
+ countDownloads: `path:"sklearn_model.joblib"`
5073
5071
  },
5074
5072
  spacy: {
5075
5073
  prettyLabel: "spaCy",
@@ -5078,9 +5076,7 @@ var MODEL_LIBRARIES_UI_ELEMENTS = {
5078
5076
  docsUrl: "https://huggingface.co/docs/hub/spacy",
5079
5077
  snippets: spacy,
5080
5078
  filter: true,
5081
- countDownloads: {
5082
- wildcard: { path: "*.whl" }
5083
- }
5079
+ countDownloads: `path_extension:"whl"`
5084
5080
  },
5085
5081
  "span-marker": {
5086
5082
  prettyLabel: "SpanMarker",
@@ -5097,18 +5093,23 @@ var MODEL_LIBRARIES_UI_ELEMENTS = {
5097
5093
  docsUrl: "https://huggingface.co/docs/hub/speechbrain",
5098
5094
  snippets: speechbrain,
5099
5095
  filter: true,
5100
- countDownloads: {
5101
- term: { path: "hyperparams.yaml" }
5102
- }
5096
+ countDownloads: `path:"hyperparams.yaml"`
5103
5097
  },
5104
5098
  "stable-audio-tools": {
5105
5099
  prettyLabel: "Stable Audio Tools",
5106
5100
  repoName: "stable-audio-tools",
5107
5101
  repoUrl: "https://github.com/Stability-AI/stable-audio-tools.git",
5108
5102
  filter: false,
5109
- countDownloads: { term: { path: "model.safetensors" } },
5103
+ countDownloads: `path:"model.safetensors"`,
5110
5104
  snippets: stable_audio_tools
5111
5105
  },
5106
+ "diffusion-single-file": {
5107
+ prettyLabel: "Diffusion Single File",
5108
+ repoName: "diffusion-single-file",
5109
+ repoUrl: "https://github.com/comfyanonymous/ComfyUI",
5110
+ filter: false,
5111
+ countDownloads: `path_extension:"safetensors"`
5112
+ },
5112
5113
  "stable-baselines3": {
5113
5114
  prettyLabel: "stable-baselines3",
5114
5115
  repoName: "stable-baselines3",
@@ -5116,9 +5117,7 @@ var MODEL_LIBRARIES_UI_ELEMENTS = {
5116
5117
  docsUrl: "https://huggingface.co/docs/hub/stable-baselines3",
5117
5118
  snippets: stableBaselines3,
5118
5119
  filter: true,
5119
- countDownloads: {
5120
- wildcard: { path: "*.zip" }
5121
- }
5120
+ countDownloads: `path_extension:"zip"`
5122
5121
  },
5123
5122
  stanza: {
5124
5123
  prettyLabel: "Stanza",
@@ -5127,9 +5126,7 @@ var MODEL_LIBRARIES_UI_ELEMENTS = {
5127
5126
  docsUrl: "https://huggingface.co/docs/hub/stanza",
5128
5127
  snippets: stanza,
5129
5128
  filter: true,
5130
- countDownloads: {
5131
- term: { path: "models/default.zip" }
5132
- }
5129
+ countDownloads: `path:"models/default.zip"`
5133
5130
  },
5134
5131
  tensorflowtts: {
5135
5132
  prettyLabel: "TensorFlowTTS",
@@ -5142,16 +5139,14 @@ var MODEL_LIBRARIES_UI_ELEMENTS = {
5142
5139
  repoName: "TiC-CLIP",
5143
5140
  repoUrl: "https://github.com/apple/ml-tic-clip",
5144
5141
  filter: false,
5145
- countDownloads: { wildcard: { path: "checkpoints/*.pt" } }
5142
+ countDownloads: `path_extension:"pt" AND path_prefix:"checkpoints/"`
5146
5143
  },
5147
5144
  timesfm: {
5148
5145
  prettyLabel: "TimesFM",
5149
5146
  repoName: "timesfm",
5150
5147
  repoUrl: "https://github.com/google-research/timesfm",
5151
5148
  filter: false,
5152
- countDownloads: {
5153
- term: { path: "checkpoints/checkpoint_1100000/state/checkpoint" }
5154
- }
5149
+ countDownloads: `path:"checkpoints/checkpoint_1100000/state/checkpoint"`
5155
5150
  },
5156
5151
  timm: {
5157
5152
  prettyLabel: "timm",
@@ -5160,9 +5155,7 @@ var MODEL_LIBRARIES_UI_ELEMENTS = {
5160
5155
  docsUrl: "https://huggingface.co/docs/hub/timm",
5161
5156
  snippets: timm,
5162
5157
  filter: true,
5163
- countDownloads: {
5164
- terms: { path: ["pytorch_model.bin", "model.safetensors"] }
5165
- }
5158
+ countDownloads: `path:"pytorch_model.bin" OR path:"model.safetensors"`
5166
5159
  },
5167
5160
  transformers: {
5168
5161
  prettyLabel: "Transformers",
@@ -5186,9 +5179,7 @@ var MODEL_LIBRARIES_UI_ELEMENTS = {
5186
5179
  repoUrl: "https://github.com/Unity-Technologies/sentis-samples",
5187
5180
  snippets: sentis,
5188
5181
  filter: true,
5189
- countDownloads: {
5190
- wildcard: { path: "*.sentis" }
5191
- }
5182
+ countDownloads: `path_extension:"sentis"`
5192
5183
  },
5193
5184
  voicecraft: {
5194
5185
  prettyLabel: "VoiceCraft",
@@ -5201,9 +5192,7 @@ var MODEL_LIBRARIES_UI_ELEMENTS = {
5201
5192
  prettyLabel: "WhisperKit",
5202
5193
  repoName: "WhisperKit",
5203
5194
  repoUrl: "https://github.com/argmaxinc/WhisperKit",
5204
- countDownloads: {
5205
- wildcard: { path: "*/model.mil" }
5206
- }
5195
+ countDownloads: `path_filename:"model" AND path_extension:"mil" AND _exists_:"path_prefix"`
5207
5196
  }
5208
5197
  };
5209
5198
  var ALL_MODEL_LIBRARY_KEYS = Object.keys(MODEL_LIBRARIES_UI_ELEMENTS);