@huggingface/tasks 0.19.15 → 0.19.17

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.
Files changed (40) hide show
  1. package/dist/commonjs/default-widget-inputs.js +1 -1
  2. package/dist/commonjs/hardware.d.ts +4 -0
  3. package/dist/commonjs/hardware.d.ts.map +1 -1
  4. package/dist/commonjs/hardware.js +4 -0
  5. package/dist/commonjs/model-libraries-snippets.d.ts +3 -0
  6. package/dist/commonjs/model-libraries-snippets.d.ts.map +1 -1
  7. package/dist/commonjs/model-libraries-snippets.js +93 -2
  8. package/dist/commonjs/model-libraries.d.ts +37 -1
  9. package/dist/commonjs/model-libraries.d.ts.map +1 -1
  10. package/dist/commonjs/model-libraries.js +36 -0
  11. package/dist/commonjs/pipelines.d.ts +5 -62
  12. package/dist/commonjs/pipelines.d.ts.map +1 -1
  13. package/dist/commonjs/pipelines.js +4 -57
  14. package/dist/commonjs/tasks/index.d.ts.map +1 -1
  15. package/dist/commonjs/tasks/index.js +2 -0
  16. package/dist/esm/default-widget-inputs.js +1 -1
  17. package/dist/esm/hardware.d.ts +4 -0
  18. package/dist/esm/hardware.d.ts.map +1 -1
  19. package/dist/esm/hardware.js +4 -0
  20. package/dist/esm/model-libraries-snippets.d.ts +3 -0
  21. package/dist/esm/model-libraries-snippets.d.ts.map +1 -1
  22. package/dist/esm/model-libraries-snippets.js +88 -0
  23. package/dist/esm/model-libraries.d.ts +37 -1
  24. package/dist/esm/model-libraries.d.ts.map +1 -1
  25. package/dist/esm/model-libraries.js +36 -0
  26. package/dist/esm/pipelines.d.ts +5 -62
  27. package/dist/esm/pipelines.d.ts.map +1 -1
  28. package/dist/esm/pipelines.js +4 -57
  29. package/dist/esm/tasks/index.d.ts.map +1 -1
  30. package/dist/esm/tasks/index.js +2 -0
  31. package/package.json +1 -1
  32. package/src/default-widget-inputs.ts +1 -1
  33. package/src/hardware.ts +4 -0
  34. package/src/model-libraries-snippets.ts +98 -0
  35. package/src/model-libraries.ts +36 -0
  36. package/src/pipelines.ts +4 -61
  37. package/src/tasks/index.ts +2 -1
  38. package/src/tasks/placeholder/spec/output.json +1 -1
  39. package/src/tasks/reinforcement-learning/about.md +1 -1
  40. package/src/tasks/text-generation/about.md +1 -1
package/src/pipelines.ts CHANGED
@@ -43,10 +43,6 @@ export interface PipelineData {
43
43
  name: string;
44
44
  subtasks?: SubTask[];
45
45
  modality: Modality;
46
- /**
47
- * color for the tag icon.
48
- */
49
- color: "blue" | "green" | "indigo" | "orange" | "red" | "yellow";
50
46
  /**
51
47
  * whether to hide in /models filters
52
48
  */
@@ -143,7 +139,6 @@ export const PIPELINE_DATA = {
143
139
  },
144
140
  ],
145
141
  modality: "nlp",
146
- color: "orange",
147
142
  },
148
143
  "token-classification": {
149
144
  name: "Token Classification",
@@ -174,12 +169,10 @@ export const PIPELINE_DATA = {
174
169
  },
175
170
  ],
176
171
  modality: "nlp",
177
- color: "blue",
178
172
  },
179
173
  "table-question-answering": {
180
174
  name: "Table Question Answering",
181
175
  modality: "nlp",
182
- color: "green",
183
176
  },
184
177
  "question-answering": {
185
178
  name: "Question Answering",
@@ -198,17 +191,14 @@ export const PIPELINE_DATA = {
198
191
  },
199
192
  ],
200
193
  modality: "nlp",
201
- color: "blue",
202
194
  },
203
195
  "zero-shot-classification": {
204
196
  name: "Zero-Shot Classification",
205
197
  modality: "nlp",
206
- color: "yellow",
207
198
  },
208
199
  translation: {
209
200
  name: "Translation",
210
201
  modality: "nlp",
211
- color: "green",
212
202
  },
213
203
  summarization: {
214
204
  name: "Summarization",
@@ -223,12 +213,10 @@ export const PIPELINE_DATA = {
223
213
  },
224
214
  ],
225
215
  modality: "nlp",
226
- color: "indigo",
227
216
  },
228
217
  "feature-extraction": {
229
218
  name: "Feature Extraction",
230
219
  modality: "nlp",
231
- color: "red",
232
220
  },
233
221
  "text-generation": {
234
222
  name: "Text Generation",
@@ -251,7 +239,6 @@ export const PIPELINE_DATA = {
251
239
  },
252
240
  ],
253
241
  modality: "nlp",
254
- color: "indigo",
255
242
  },
256
243
  "text2text-generation": {
257
244
  name: "Text2Text Generation",
@@ -286,7 +273,6 @@ export const PIPELINE_DATA = {
286
273
  },
287
274
  ],
288
275
  modality: "nlp",
289
- color: "indigo",
290
276
  },
291
277
  "fill-mask": {
292
278
  name: "Fill-Mask",
@@ -301,32 +287,26 @@ export const PIPELINE_DATA = {
301
287
  },
302
288
  ],
303
289
  modality: "nlp",
304
- color: "red",
305
290
  },
306
291
  "sentence-similarity": {
307
292
  name: "Sentence Similarity",
308
293
  modality: "nlp",
309
- color: "yellow",
310
294
  },
311
295
  "text-to-speech": {
312
296
  name: "Text-to-Speech",
313
297
  modality: "audio",
314
- color: "yellow",
315
298
  },
316
299
  "text-to-audio": {
317
300
  name: "Text-to-Audio",
318
301
  modality: "audio",
319
- color: "yellow",
320
302
  },
321
303
  "automatic-speech-recognition": {
322
304
  name: "Automatic Speech Recognition",
323
305
  modality: "audio",
324
- color: "yellow",
325
306
  },
326
307
  "audio-to-audio": {
327
308
  name: "Audio-to-Audio",
328
309
  modality: "audio",
329
- color: "blue",
330
310
  },
331
311
  "audio-classification": {
332
312
  name: "Audio Classification",
@@ -353,23 +333,19 @@ export const PIPELINE_DATA = {
353
333
  },
354
334
  ],
355
335
  modality: "audio",
356
- color: "green",
357
336
  },
358
337
  "audio-text-to-text": {
359
338
  name: "Audio-Text-to-Text",
360
339
  modality: "multimodal",
361
- color: "red",
362
340
  hideInDatasets: true,
363
341
  },
364
342
  "voice-activity-detection": {
365
343
  name: "Voice Activity Detection",
366
344
  modality: "audio",
367
- color: "red",
368
345
  },
369
346
  "depth-estimation": {
370
347
  name: "Depth Estimation",
371
348
  modality: "cv",
372
- color: "yellow",
373
349
  },
374
350
  "image-classification": {
375
351
  name: "Image Classification",
@@ -384,7 +360,6 @@ export const PIPELINE_DATA = {
384
360
  },
385
361
  ],
386
362
  modality: "cv",
387
- color: "blue",
388
363
  },
389
364
  "object-detection": {
390
365
  name: "Object Detection",
@@ -399,7 +374,6 @@ export const PIPELINE_DATA = {
399
374
  },
400
375
  ],
401
376
  modality: "cv",
402
- color: "yellow",
403
377
  },
404
378
  "image-segmentation": {
405
379
  name: "Image Segmentation",
@@ -418,12 +392,10 @@ export const PIPELINE_DATA = {
418
392
  },
419
393
  ],
420
394
  modality: "cv",
421
- color: "green",
422
395
  },
423
396
  "text-to-image": {
424
397
  name: "Text-to-Image",
425
398
  modality: "cv",
426
- color: "yellow",
427
399
  },
428
400
  "image-to-text": {
429
401
  name: "Image-to-Text",
@@ -434,7 +406,6 @@ export const PIPELINE_DATA = {
434
406
  },
435
407
  ],
436
408
  modality: "cv",
437
- color: "red",
438
409
  },
439
410
  "image-to-image": {
440
411
  name: "Image-to-Image",
@@ -453,27 +424,22 @@ export const PIPELINE_DATA = {
453
424
  },
454
425
  ],
455
426
  modality: "cv",
456
- color: "indigo",
457
427
  },
458
428
  "image-to-video": {
459
429
  name: "Image-to-Video",
460
430
  modality: "cv",
461
- color: "indigo",
462
431
  },
463
432
  "unconditional-image-generation": {
464
433
  name: "Unconditional Image Generation",
465
434
  modality: "cv",
466
- color: "green",
467
435
  },
468
436
  "video-classification": {
469
437
  name: "Video Classification",
470
438
  modality: "cv",
471
- color: "blue",
472
439
  },
473
440
  "reinforcement-learning": {
474
441
  name: "Reinforcement Learning",
475
442
  modality: "rl",
476
- color: "red",
477
443
  },
478
444
  robotics: {
479
445
  name: "Robotics",
@@ -488,7 +454,6 @@ export const PIPELINE_DATA = {
488
454
  name: "Task Planning",
489
455
  },
490
456
  ],
491
- color: "blue",
492
457
  },
493
458
  "tabular-classification": {
494
459
  name: "Tabular Classification",
@@ -503,7 +468,6 @@ export const PIPELINE_DATA = {
503
468
  name: "Tabular Multi Label Classification",
504
469
  },
505
470
  ],
506
- color: "blue",
507
471
  },
508
472
  "tabular-regression": {
509
473
  name: "Tabular Regression",
@@ -514,7 +478,6 @@ export const PIPELINE_DATA = {
514
478
  name: "Tabular Single Column Regression",
515
479
  },
516
480
  ],
517
- color: "blue",
518
481
  },
519
482
  "tabular-to-text": {
520
483
  name: "Tabular to Text",
@@ -525,13 +488,11 @@ export const PIPELINE_DATA = {
525
488
  name: "RDF to text",
526
489
  },
527
490
  ],
528
- color: "blue",
529
491
  hideInModels: true,
530
492
  },
531
493
  "table-to-text": {
532
494
  name: "Table to Text",
533
495
  modality: "nlp",
534
- color: "blue",
535
496
  hideInModels: true,
536
497
  },
537
498
  "multiple-choice": {
@@ -547,13 +508,11 @@ export const PIPELINE_DATA = {
547
508
  },
548
509
  ],
549
510
  modality: "nlp",
550
- color: "blue",
551
511
  hideInModels: true,
552
512
  },
553
513
  "text-ranking": {
554
514
  name: "Text Ranking",
555
515
  modality: "nlp",
556
- color: "red",
557
516
  },
558
517
  "text-retrieval": {
559
518
  name: "Text Retrieval",
@@ -576,7 +535,6 @@ export const PIPELINE_DATA = {
576
535
  },
577
536
  ],
578
537
  modality: "nlp",
579
- color: "indigo",
580
538
  hideInModels: true,
581
539
  },
582
540
  "time-series-forecasting": {
@@ -592,18 +550,14 @@ export const PIPELINE_DATA = {
592
550
  name: "Multivariate Time Series Forecasting",
593
551
  },
594
552
  ],
595
- color: "blue",
596
553
  },
597
554
  "text-to-video": {
598
555
  name: "Text-to-Video",
599
556
  modality: "cv",
600
- color: "green",
601
557
  },
602
558
  "image-text-to-text": {
603
559
  name: "Image-Text-to-Text",
604
560
  modality: "multimodal",
605
- color: "red",
606
- hideInDatasets: true,
607
561
  },
608
562
  "visual-question-answering": {
609
563
  name: "Visual Question Answering",
@@ -614,7 +568,6 @@ export const PIPELINE_DATA = {
614
568
  },
615
569
  ],
616
570
  modality: "multimodal",
617
- color: "red",
618
571
  },
619
572
  "document-question-answering": {
620
573
  name: "Document Question Answering",
@@ -625,48 +578,39 @@ export const PIPELINE_DATA = {
625
578
  },
626
579
  ],
627
580
  modality: "multimodal",
628
- color: "blue",
629
581
  hideInDatasets: true,
630
582
  },
631
583
  "zero-shot-image-classification": {
632
584
  name: "Zero-Shot Image Classification",
633
585
  modality: "cv",
634
- color: "yellow",
635
586
  },
636
587
  "graph-ml": {
637
588
  name: "Graph Machine Learning",
638
589
  modality: "other",
639
- color: "green",
640
590
  },
641
591
  "mask-generation": {
642
592
  name: "Mask Generation",
643
593
  modality: "cv",
644
- color: "indigo",
645
594
  },
646
595
  "zero-shot-object-detection": {
647
596
  name: "Zero-Shot Object Detection",
648
597
  modality: "cv",
649
- color: "yellow",
650
598
  },
651
599
  "text-to-3d": {
652
600
  name: "Text-to-3D",
653
601
  modality: "cv",
654
- color: "yellow",
655
602
  },
656
603
  "image-to-3d": {
657
604
  name: "Image-to-3D",
658
605
  modality: "cv",
659
- color: "green",
660
606
  },
661
607
  "image-feature-extraction": {
662
608
  name: "Image Feature Extraction",
663
609
  modality: "cv",
664
- color: "indigo",
665
610
  },
666
611
  "video-text-to-text": {
667
612
  name: "Video-Text-to-Text",
668
613
  modality: "multimodal",
669
- color: "blue",
670
614
  hideInDatasets: false,
671
615
  },
672
616
  "keypoint-detection": {
@@ -678,25 +622,24 @@ export const PIPELINE_DATA = {
678
622
  },
679
623
  ],
680
624
  modality: "cv",
681
- color: "red",
682
625
  hideInDatasets: true,
683
626
  },
684
627
  "visual-document-retrieval": {
685
628
  name: "Visual Document Retrieval",
686
629
  modality: "multimodal",
687
- color: "yellow",
688
- hideInDatasets: true,
689
630
  },
690
631
  "any-to-any": {
691
632
  name: "Any-to-Any",
692
633
  modality: "multimodal",
693
- color: "yellow",
634
+ },
635
+ "video-to-video": {
636
+ name: "Video-to-Video",
637
+ modality: "cv",
694
638
  hideInDatasets: true,
695
639
  },
696
640
  other: {
697
641
  name: "Other",
698
642
  modality: "other",
699
- color: "blue",
700
643
  hideInModels: true,
701
644
  hideInDatasets: true,
702
645
  },
@@ -113,7 +113,6 @@ export type {
113
113
  } from "./zero-shot-object-detection/inference.js";
114
114
 
115
115
  import type { ModelLibraryKey } from "../model-libraries.js";
116
-
117
116
  /**
118
117
  * Model libraries compatible with each ML task
119
118
  */
@@ -181,6 +180,7 @@ export const TASKS_MODEL_LIBRARIES: Record<PipelineType, ModelLibraryKey[]> = {
181
180
  "image-to-3d": ["diffusers"],
182
181
  "any-to-any": ["transformers"],
183
182
  "visual-document-retrieval": ["transformers"],
183
+ "video-to-video": ["diffusers"],
184
184
  };
185
185
 
186
186
  /**
@@ -250,6 +250,7 @@ export const TASKS_DATA: Record<PipelineType, TaskData | undefined> = {
250
250
  translation: getData("translation", translation),
251
251
  "unconditional-image-generation": getData("unconditional-image-generation", unconditionalImageGeneration),
252
252
  "video-text-to-text": getData("video-text-to-text", videoTextToText),
253
+ "video-to-video": getData("video-to-video", placeholder),
253
254
  "visual-question-answering": getData("visual-question-answering", visualQuestionAnswering),
254
255
  "voice-activity-detection": undefined,
255
256
  "zero-shot-classification": getData("zero-shot-classification", zeroShotClassification),
@@ -9,7 +9,7 @@
9
9
  "properties": {
10
10
  "meaningful_output_name": {
11
11
  "type": "string",
12
- "description": "TODO: Describe what is outputed by the inference here"
12
+ "description": "TODO: Describe what is outputted by the inference here"
13
13
  }
14
14
  },
15
15
  "required": ["meaningfulOutputName"]
@@ -48,7 +48,7 @@ Observations and states are the information our agent gets from the environment.
48
48
 
49
49
  Inference in reinforcement learning differs from other modalities, in which there's a model and test data. In reinforcement learning, once you have trained an agent in an environment, you try to run the trained agent for additional steps to get the average reward.
50
50
 
51
- A typical training cycle consists of gathering experience from the environment, training the agent, and running the agent on a test environment to obtain average reward. Below there's a snippet on how you can interact with the environment using the `gymnasium` library, train an agent using `stable-baselines3`, evalute the agent on test environment and infer actions from the trained agent.
51
+ A typical training cycle consists of gathering experience from the environment, training the agent, and running the agent on a test environment to obtain average reward. Below there's a snippet on how you can interact with the environment using the `gymnasium` library, train an agent using `stable-baselines3`, evaluate the agent on test environment and infer actions from the trained agent.
52
52
 
53
53
  ```python
54
54
  # Here we are running 20 episodes of CartPole-v1 environment, taking random actions
@@ -101,7 +101,7 @@ Would you like to learn more about the topic? Awesome! Here you can find some cu
101
101
 
102
102
  - You can use [PEFT](https://github.com/huggingface/peft) to adapt large language models in efficient way.
103
103
  - [ChatUI](https://github.com/huggingface/chat-ui) is the open-source interface to conversate with Large Language Models.
104
- - [text-generation-inferface](https://github.com/huggingface/text-generation-inference)
104
+ - [text-generation-inference](https://github.com/huggingface/text-generation-inference)
105
105
  - [HuggingChat](https://huggingface.co/chat/) is a chat interface powered by Hugging Face to chat with powerful models like Meta Llama 3 70B, Mixtral 8x7B, etc.
106
106
 
107
107
  ### Documentation