@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.
@@ -1,5 +1,5 @@
1
1
  import type { ModelData } from "./model-data";
2
- import type { ElasticBoolQueryFilter } from "./model-libraries-downloads";
2
+ import type { ElasticSearchQuery } from "./model-libraries-downloads";
3
3
  /**
4
4
  * Elements configurable by a model library.
5
5
  */
@@ -32,7 +32,7 @@ export interface LibraryUiElement {
32
32
  * By default, those files are counted:
33
33
  * "config.json", "config.yaml", "hyperparams.yaml", "meta.yaml"
34
34
  */
35
- countDownloads?: ElasticBoolQueryFilter;
35
+ countDownloads?: ElasticSearchQuery;
36
36
  /**
37
37
  * should we display this library in hf.co/models filter
38
38
  * (only for popular libraries with > 100 models)
@@ -61,11 +61,7 @@ export declare const MODEL_LIBRARIES_UI_ELEMENTS: {
61
61
  docsUrl: string;
62
62
  snippets: (model: ModelData) => string[];
63
63
  filter: true;
64
- countDownloads: {
65
- term: {
66
- path: string;
67
- };
68
- };
64
+ countDownloads: string;
69
65
  };
70
66
  allennlp: {
71
67
  prettyLabel: string;
@@ -82,11 +78,7 @@ export declare const MODEL_LIBRARIES_UI_ELEMENTS: {
82
78
  docsUrl: string;
83
79
  snippets: (model: ModelData) => string[];
84
80
  filter: true;
85
- countDownloads: {
86
- term: {
87
- path: string;
88
- };
89
- };
81
+ countDownloads: string;
90
82
  };
91
83
  audiocraft: {
92
84
  prettyLabel: string;
@@ -95,6 +87,14 @@ export declare const MODEL_LIBRARIES_UI_ELEMENTS: {
95
87
  snippets: (model: ModelData) => string[];
96
88
  filter: false;
97
89
  };
90
+ audioseal: {
91
+ prettyLabel: string;
92
+ repoName: string;
93
+ repoUrl: string;
94
+ filter: false;
95
+ countDownloads: string;
96
+ snippets: (model: ModelData) => string[];
97
+ };
98
98
  bertopic: {
99
99
  prettyLabel: string;
100
100
  repoName: string;
@@ -107,11 +107,7 @@ export declare const MODEL_LIBRARIES_UI_ELEMENTS: {
107
107
  repoName: string;
108
108
  repoUrl: string;
109
109
  filter: false;
110
- countDownloads: {
111
- wildcard: {
112
- path: string;
113
- };
114
- };
110
+ countDownloads: string;
115
111
  };
116
112
  bm25s: {
117
113
  prettyLabel: string;
@@ -119,23 +115,15 @@ export declare const MODEL_LIBRARIES_UI_ELEMENTS: {
119
115
  repoUrl: string;
120
116
  snippets: (model: ModelData) => string[];
121
117
  filter: false;
122
- countDownloads: {
123
- term: {
124
- path: string;
125
- };
126
- };
118
+ countDownloads: string;
127
119
  };
128
120
  chat_tts: {
129
121
  prettyLabel: string;
130
122
  repoName: string;
131
123
  repoUrl: string;
132
- filter: false;
133
- countDownloads: {
134
- term: {
135
- path: string;
136
- };
137
- };
138
124
  snippets: () => string[];
125
+ filter: false;
126
+ countDownloads: string;
139
127
  };
140
128
  diffusers: {
141
129
  prettyLabel: string;
@@ -157,22 +145,14 @@ export declare const MODEL_LIBRARIES_UI_ELEMENTS: {
157
145
  docsUrl: string;
158
146
  filter: false;
159
147
  snippets: (model: ModelData) => string[];
160
- countDownloads: {
161
- wildcard: {
162
- path: string;
163
- };
164
- };
148
+ countDownloads: string;
165
149
  };
166
150
  elm: {
167
151
  prettyLabel: string;
168
152
  repoName: string;
169
153
  repoUrl: string;
170
154
  filter: false;
171
- countDownloads: {
172
- wildcard: {
173
- path: string;
174
- };
175
- };
155
+ countDownloads: string;
176
156
  };
177
157
  espnet: {
178
158
  prettyLabel: string;
@@ -203,11 +183,7 @@ export declare const MODEL_LIBRARIES_UI_ELEMENTS: {
203
183
  repoUrl: string;
204
184
  snippets: (model: ModelData) => string[];
205
185
  filter: true;
206
- countDownloads: {
207
- wildcard: {
208
- path: string;
209
- };
210
- };
186
+ countDownloads: string;
211
187
  };
212
188
  flair: {
213
189
  prettyLabel: string;
@@ -216,22 +192,14 @@ export declare const MODEL_LIBRARIES_UI_ELEMENTS: {
216
192
  docsUrl: string;
217
193
  snippets: (model: ModelData) => string[];
218
194
  filter: true;
219
- countDownloads: {
220
- term: {
221
- path: string;
222
- };
223
- };
195
+ countDownloads: string;
224
196
  };
225
197
  "gemma.cpp": {
226
198
  prettyLabel: string;
227
199
  repoName: string;
228
200
  repoUrl: string;
229
201
  filter: false;
230
- countDownloads: {
231
- wildcard: {
232
- path: string;
233
- };
234
- };
202
+ countDownloads: string;
235
203
  };
236
204
  gliner: {
237
205
  prettyLabel: string;
@@ -239,32 +207,20 @@ export declare const MODEL_LIBRARIES_UI_ELEMENTS: {
239
207
  repoUrl: string;
240
208
  snippets: (model: ModelData) => string[];
241
209
  filter: false;
242
- countDownloads: {
243
- term: {
244
- path: string;
245
- };
246
- };
210
+ countDownloads: string;
247
211
  };
248
212
  grok: {
249
213
  prettyLabel: string;
250
214
  repoName: string;
251
215
  repoUrl: string;
252
216
  filter: false;
253
- countDownloads: {
254
- terms: {
255
- path: string[];
256
- };
257
- };
217
+ countDownloads: string;
258
218
  };
259
219
  "hunyuan-dit": {
260
220
  prettyLabel: string;
261
221
  repoName: string;
262
222
  repoUrl: string;
263
- countDownloads: {
264
- terms: {
265
- path: string[];
266
- };
267
- };
223
+ countDownloads: string;
268
224
  };
269
225
  keras: {
270
226
  prettyLabel: string;
@@ -273,11 +229,7 @@ export declare const MODEL_LIBRARIES_UI_ELEMENTS: {
273
229
  docsUrl: string;
274
230
  snippets: (model: ModelData) => string[];
275
231
  filter: true;
276
- countDownloads: {
277
- term: {
278
- path: string;
279
- };
280
- };
232
+ countDownloads: string;
281
233
  };
282
234
  "keras-nlp": {
283
235
  prettyLabel: string;
@@ -303,11 +255,7 @@ export declare const MODEL_LIBRARIES_UI_ELEMENTS: {
303
255
  docsUrl: string;
304
256
  snippets: (model: ModelData) => string[];
305
257
  filter: true;
306
- countDownloads: {
307
- wildcard: {
308
- path: string;
309
- };
310
- };
258
+ countDownloads: string;
311
259
  };
312
260
  mlx: {
313
261
  prettyLabel: string;
@@ -323,11 +271,7 @@ export declare const MODEL_LIBRARIES_UI_ELEMENTS: {
323
271
  docsUrl: string;
324
272
  snippets: (model: ModelData) => string[];
325
273
  filter: false;
326
- countDownloads: {
327
- term: {
328
- path: string;
329
- };
330
- };
274
+ countDownloads: string;
331
275
  };
332
276
  nemo: {
333
277
  prettyLabel: string;
@@ -335,11 +279,7 @@ export declare const MODEL_LIBRARIES_UI_ELEMENTS: {
335
279
  repoUrl: string;
336
280
  snippets: (model: ModelData) => string[];
337
281
  filter: true;
338
- countDownloads: {
339
- wildcard: {
340
- path: string;
341
- };
342
- };
282
+ countDownloads: string;
343
283
  };
344
284
  open_clip: {
345
285
  prettyLabel: string;
@@ -347,11 +287,7 @@ export declare const MODEL_LIBRARIES_UI_ELEMENTS: {
347
287
  repoUrl: string;
348
288
  snippets: (model: ModelData) => string[];
349
289
  filter: true;
350
- countDownloads: {
351
- wildcard: {
352
- path: string;
353
- };
354
- };
290
+ countDownloads: string;
355
291
  };
356
292
  paddlenlp: {
357
293
  prettyLabel: string;
@@ -360,11 +296,7 @@ export declare const MODEL_LIBRARIES_UI_ELEMENTS: {
360
296
  docsUrl: string;
361
297
  snippets: (model: ModelData) => string[];
362
298
  filter: true;
363
- countDownloads: {
364
- term: {
365
- path: string;
366
- };
367
- };
299
+ countDownloads: string;
368
300
  };
369
301
  peft: {
370
302
  prettyLabel: string;
@@ -372,11 +304,7 @@ export declare const MODEL_LIBRARIES_UI_ELEMENTS: {
372
304
  repoUrl: string;
373
305
  snippets: (model: ModelData) => string[];
374
306
  filter: true;
375
- countDownloads: {
376
- term: {
377
- path: string;
378
- };
379
- };
307
+ countDownloads: string;
380
308
  };
381
309
  "pyannote-audio": {
382
310
  prettyLabel: string;
@@ -397,11 +325,7 @@ export declare const MODEL_LIBRARIES_UI_ELEMENTS: {
397
325
  repoName: string;
398
326
  repoUrl: string;
399
327
  filter: false;
400
- countDownloads: {
401
- term: {
402
- path: string;
403
- };
404
- };
328
+ countDownloads: string;
405
329
  };
406
330
  "sample-factory": {
407
331
  prettyLabel: string;
@@ -410,11 +334,7 @@ export declare const MODEL_LIBRARIES_UI_ELEMENTS: {
410
334
  docsUrl: string;
411
335
  snippets: (model: ModelData) => string[];
412
336
  filter: true;
413
- countDownloads: {
414
- term: {
415
- path: string;
416
- };
417
- };
337
+ countDownloads: string;
418
338
  };
419
339
  "sentence-transformers": {
420
340
  prettyLabel: string;
@@ -438,11 +358,7 @@ export declare const MODEL_LIBRARIES_UI_ELEMENTS: {
438
358
  repoUrl: string;
439
359
  snippets: (model: ModelData) => string[];
440
360
  filter: true;
441
- countDownloads: {
442
- term: {
443
- path: string;
444
- };
445
- };
361
+ countDownloads: string;
446
362
  };
447
363
  spacy: {
448
364
  prettyLabel: string;
@@ -451,11 +367,7 @@ export declare const MODEL_LIBRARIES_UI_ELEMENTS: {
451
367
  docsUrl: string;
452
368
  snippets: (model: ModelData) => string[];
453
369
  filter: true;
454
- countDownloads: {
455
- wildcard: {
456
- path: string;
457
- };
458
- };
370
+ countDownloads: string;
459
371
  };
460
372
  "span-marker": {
461
373
  prettyLabel: string;
@@ -472,24 +384,23 @@ export declare const MODEL_LIBRARIES_UI_ELEMENTS: {
472
384
  docsUrl: string;
473
385
  snippets: (model: ModelData) => string[];
474
386
  filter: true;
475
- countDownloads: {
476
- term: {
477
- path: string;
478
- };
479
- };
387
+ countDownloads: string;
480
388
  };
481
389
  "stable-audio-tools": {
482
390
  prettyLabel: string;
483
391
  repoName: string;
484
392
  repoUrl: string;
485
393
  filter: false;
486
- countDownloads: {
487
- term: {
488
- path: string;
489
- };
490
- };
394
+ countDownloads: string;
491
395
  snippets: (model: ModelData) => string[];
492
396
  };
397
+ "diffusion-single-file": {
398
+ prettyLabel: string;
399
+ repoName: string;
400
+ repoUrl: string;
401
+ filter: false;
402
+ countDownloads: string;
403
+ };
493
404
  "stable-baselines3": {
494
405
  prettyLabel: string;
495
406
  repoName: string;
@@ -497,11 +408,7 @@ export declare const MODEL_LIBRARIES_UI_ELEMENTS: {
497
408
  docsUrl: string;
498
409
  snippets: (model: ModelData) => string[];
499
410
  filter: true;
500
- countDownloads: {
501
- wildcard: {
502
- path: string;
503
- };
504
- };
411
+ countDownloads: string;
505
412
  };
506
413
  stanza: {
507
414
  prettyLabel: string;
@@ -510,11 +417,7 @@ export declare const MODEL_LIBRARIES_UI_ELEMENTS: {
510
417
  docsUrl: string;
511
418
  snippets: (model: ModelData) => string[];
512
419
  filter: true;
513
- countDownloads: {
514
- term: {
515
- path: string;
516
- };
517
- };
420
+ countDownloads: string;
518
421
  };
519
422
  tensorflowtts: {
520
423
  prettyLabel: string;
@@ -527,22 +430,14 @@ export declare const MODEL_LIBRARIES_UI_ELEMENTS: {
527
430
  repoName: string;
528
431
  repoUrl: string;
529
432
  filter: false;
530
- countDownloads: {
531
- wildcard: {
532
- path: string;
533
- };
534
- };
433
+ countDownloads: string;
535
434
  };
536
435
  timesfm: {
537
436
  prettyLabel: string;
538
437
  repoName: string;
539
438
  repoUrl: string;
540
439
  filter: false;
541
- countDownloads: {
542
- term: {
543
- path: string;
544
- };
545
- };
440
+ countDownloads: string;
546
441
  };
547
442
  timm: {
548
443
  prettyLabel: string;
@@ -551,11 +446,7 @@ export declare const MODEL_LIBRARIES_UI_ELEMENTS: {
551
446
  docsUrl: string;
552
447
  snippets: (model: ModelData) => string[];
553
448
  filter: true;
554
- countDownloads: {
555
- terms: {
556
- path: string[];
557
- };
558
- };
449
+ countDownloads: string;
559
450
  };
560
451
  transformers: {
561
452
  prettyLabel: string;
@@ -579,11 +470,7 @@ export declare const MODEL_LIBRARIES_UI_ELEMENTS: {
579
470
  repoUrl: string;
580
471
  snippets: () => string[];
581
472
  filter: true;
582
- countDownloads: {
583
- wildcard: {
584
- path: string;
585
- };
586
- };
473
+ countDownloads: string;
587
474
  };
588
475
  voicecraft: {
589
476
  prettyLabel: string;
@@ -596,14 +483,10 @@ export declare const MODEL_LIBRARIES_UI_ELEMENTS: {
596
483
  prettyLabel: string;
597
484
  repoName: string;
598
485
  repoUrl: string;
599
- countDownloads: {
600
- wildcard: {
601
- path: string;
602
- };
603
- };
486
+ countDownloads: string;
604
487
  };
605
488
  };
606
489
  export type ModelLibraryKey = keyof typeof MODEL_LIBRARIES_UI_ELEMENTS;
607
- export declare const ALL_MODEL_LIBRARY_KEYS: ("adapter-transformers" | "allennlp" | "asteroid" | "audiocraft" | "bertopic" | "big_vision" | "bm25s" | "chat_tts" | "diffusers" | "doctr" | "edsnlp" | "elm" | "espnet" | "fairseq" | "fastai" | "fasttext" | "flair" | "gemma.cpp" | "gliner" | "grok" | "hunyuan-dit" | "keras" | "keras-nlp" | "k2" | "mindspore" | "ml-agents" | "mlx" | "mlx-image" | "nemo" | "open_clip" | "paddlenlp" | "peft" | "pyannote-audio" | "pythae" | "recurrentgemma" | "sample-factory" | "sentence-transformers" | "setfit" | "sklearn" | "spacy" | "span-marker" | "speechbrain" | "stable-audio-tools" | "stable-baselines3" | "stanza" | "tensorflowtts" | "tic-clip" | "timesfm" | "timm" | "transformers" | "transformers.js" | "unity-sentis" | "voicecraft" | "whisperkit")[];
608
- export declare const ALL_DISPLAY_MODEL_LIBRARY_KEYS: ("adapter-transformers" | "allennlp" | "asteroid" | "audiocraft" | "bertopic" | "big_vision" | "bm25s" | "chat_tts" | "diffusers" | "doctr" | "edsnlp" | "elm" | "espnet" | "fairseq" | "fastai" | "fasttext" | "flair" | "gemma.cpp" | "gliner" | "grok" | "hunyuan-dit" | "keras" | "keras-nlp" | "k2" | "mindspore" | "ml-agents" | "mlx" | "mlx-image" | "nemo" | "open_clip" | "paddlenlp" | "peft" | "pyannote-audio" | "pythae" | "recurrentgemma" | "sample-factory" | "sentence-transformers" | "setfit" | "sklearn" | "spacy" | "span-marker" | "speechbrain" | "stable-audio-tools" | "stable-baselines3" | "stanza" | "tensorflowtts" | "tic-clip" | "timesfm" | "timm" | "transformers" | "transformers.js" | "unity-sentis" | "voicecraft" | "whisperkit")[];
490
+ export declare const ALL_MODEL_LIBRARY_KEYS: ("adapter-transformers" | "allennlp" | "asteroid" | "audiocraft" | "audioseal" | "bertopic" | "big_vision" | "bm25s" | "chat_tts" | "diffusers" | "doctr" | "edsnlp" | "elm" | "espnet" | "fairseq" | "fastai" | "fasttext" | "flair" | "gemma.cpp" | "gliner" | "grok" | "hunyuan-dit" | "keras" | "keras-nlp" | "k2" | "mindspore" | "ml-agents" | "mlx" | "mlx-image" | "nemo" | "open_clip" | "paddlenlp" | "peft" | "pyannote-audio" | "pythae" | "recurrentgemma" | "sample-factory" | "sentence-transformers" | "setfit" | "sklearn" | "spacy" | "span-marker" | "speechbrain" | "stable-audio-tools" | "diffusion-single-file" | "stable-baselines3" | "stanza" | "tensorflowtts" | "tic-clip" | "timesfm" | "timm" | "transformers" | "transformers.js" | "unity-sentis" | "voicecraft" | "whisperkit")[];
491
+ export declare const ALL_DISPLAY_MODEL_LIBRARY_KEYS: ("adapter-transformers" | "allennlp" | "asteroid" | "audiocraft" | "audioseal" | "bertopic" | "big_vision" | "bm25s" | "chat_tts" | "diffusers" | "doctr" | "edsnlp" | "elm" | "espnet" | "fairseq" | "fastai" | "fasttext" | "flair" | "gemma.cpp" | "gliner" | "grok" | "hunyuan-dit" | "keras" | "keras-nlp" | "k2" | "mindspore" | "ml-agents" | "mlx" | "mlx-image" | "nemo" | "open_clip" | "paddlenlp" | "peft" | "pyannote-audio" | "pythae" | "recurrentgemma" | "sample-factory" | "sentence-transformers" | "setfit" | "sklearn" | "spacy" | "span-marker" | "speechbrain" | "stable-audio-tools" | "diffusion-single-file" | "stable-baselines3" | "stanza" | "tensorflowtts" | "tic-clip" | "timesfm" | "timm" | "transformers" | "transformers.js" | "unity-sentis" | "voicecraft" | "whisperkit")[];
609
492
  //# sourceMappingURL=model-libraries.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"model-libraries.d.ts","sourceRoot":"","sources":["../../src/model-libraries.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MA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;;;;;;;;;;;CAibI,CAAC;AAE7C,MAAM,MAAM,eAAe,GAAG,MAAM,OAAO,2BAA2B,CAAC;AAEvE,eAAO,MAAM,sBAAsB,oxBAAgE,CAAC;AAEpG,eAAO,MAAM,8BAA8B,oxBAQ1B,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@huggingface/tasks",
3
3
  "packageManager": "pnpm@8.10.5",
4
- "version": "0.10.16",
4
+ "version": "0.10.18",
5
5
  "description": "List of ML tasks for huggingface.co/tasks",
6
6
  "repository": "https://github.com/huggingface/huggingface.js.git",
7
7
  "publishConfig": {
@@ -6,15 +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
17
 
14
- export type ElasticBoolQueryFilter =
15
- // match a single filename
16
- | { term?: { path: string } }
17
- // match multiple possible filenames
18
- | { terms?: { path: string[] } }
19
- // match a wildcard
20
- | { wildcard?: { path: string } };
18
+ export type ElasticSearchQuery = string;
@@ -46,6 +46,26 @@ export const asteroid = (model: ModelData): string[] => [
46
46
  model = BaseModel.from_pretrained("${model.id}")`,
47
47
  ];
48
48
 
49
+ export const audioseal = (model: ModelData): string[] => {
50
+ const watermarkSnippet = `# Watermark Generator
51
+ from audioseal import AudioSeal
52
+
53
+ model = AudioSeal.load_generator("${model.id}")
54
+ # pass a tensor (tensor_wav) of shape (batch, channels, samples) and a sample rate
55
+ wav, sr = tensor_wav, 16000
56
+
57
+ watermark = model.get_watermark(wav, sr)
58
+ watermarked_audio = wav + watermark`;
59
+
60
+ const detectorSnippet = `# Watermark Detector
61
+ from audioseal import AudioSeal
62
+
63
+ detector = AudioSeal.load_detector("${model.id}")
64
+
65
+ result, message = detector.detect_watermark(watermarked_audio, sr)`;
66
+ return [watermarkSnippet, detectorSnippet];
67
+ };
68
+
49
69
  function get_base_diffusers_model(model: ModelData): string {
50
70
  return model.cardData?.base_model?.toString() ?? "fill-in-base-model";
51
71
  }