@huggingface/tasks 0.7.1 → 0.9.0
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 +170 -87
- package/dist/index.d.ts +17 -3
- package/dist/index.js +170 -87
- package/package.json +1 -1
- package/src/library-to-tasks.ts +11 -3
- package/src/model-libraries-snippets.ts +14 -0
- package/src/model-libraries.ts +14 -0
- package/src/tasks/feature-extraction/about.md +2 -9
- package/src/tasks/feature-extraction/data.ts +1 -2
- package/src/tasks/image-feature-extraction/about.md +23 -0
- package/src/tasks/image-feature-extraction/data.ts +51 -0
- package/src/tasks/index.ts +2 -1
package/dist/index.js
CHANGED
|
@@ -50,12 +50,20 @@ var LIBRARY_TASK_MAPPING = {
|
|
|
50
50
|
"fill-mask",
|
|
51
51
|
"image-classification",
|
|
52
52
|
"image-segmentation",
|
|
53
|
-
"image-to-text",
|
|
54
53
|
"image-to-image",
|
|
54
|
+
"image-to-text",
|
|
55
55
|
"object-detection",
|
|
56
56
|
"question-answering",
|
|
57
|
-
"
|
|
57
|
+
"summarization",
|
|
58
|
+
"table-question-answering",
|
|
58
59
|
"text2text-generation",
|
|
60
|
+
"text-classification",
|
|
61
|
+
"text-generation",
|
|
62
|
+
"text-to-audio",
|
|
63
|
+
"text-to-speech",
|
|
64
|
+
"token-classification",
|
|
65
|
+
"translation",
|
|
66
|
+
"video-classification",
|
|
59
67
|
"visual-question-answering",
|
|
60
68
|
"zero-shot-classification",
|
|
61
69
|
"zero-shot-image-classification"
|
|
@@ -1681,7 +1689,7 @@ var taskData5 = {
|
|
|
1681
1689
|
}
|
|
1682
1690
|
],
|
|
1683
1691
|
spaces: [],
|
|
1684
|
-
summary: "Feature extraction
|
|
1692
|
+
summary: "Feature extraction is the task of extracting features learnt in a model.",
|
|
1685
1693
|
widgetModels: ["facebook/bart-base"]
|
|
1686
1694
|
};
|
|
1687
1695
|
var data_default5 = taskData5;
|
|
@@ -1847,8 +1855,57 @@ var taskData7 = {
|
|
|
1847
1855
|
};
|
|
1848
1856
|
var data_default7 = taskData7;
|
|
1849
1857
|
|
|
1850
|
-
// src/tasks/image-
|
|
1858
|
+
// src/tasks/image-feature-extraction/data.ts
|
|
1851
1859
|
var taskData8 = {
|
|
1860
|
+
datasets: [
|
|
1861
|
+
{
|
|
1862
|
+
description: "ImageNet-1K is a image classification dataset in which images are used to train image-feature-extraction models.",
|
|
1863
|
+
id: "imagenet-1k"
|
|
1864
|
+
}
|
|
1865
|
+
],
|
|
1866
|
+
demo: {
|
|
1867
|
+
inputs: [
|
|
1868
|
+
{
|
|
1869
|
+
filename: "mask-generation-input.png",
|
|
1870
|
+
type: "img"
|
|
1871
|
+
}
|
|
1872
|
+
],
|
|
1873
|
+
outputs: [
|
|
1874
|
+
{
|
|
1875
|
+
table: [
|
|
1876
|
+
["Dimension 1", "Dimension 2", "Dimension 3"],
|
|
1877
|
+
["0.21236686408519745", "1.0919708013534546", "0.8512550592422485"],
|
|
1878
|
+
["0.809657871723175", "-0.18544459342956543", "-0.7851548194885254"],
|
|
1879
|
+
["1.3103108406066895", "-0.2479034662246704", "-0.9107287526130676"],
|
|
1880
|
+
["1.8536205291748047", "-0.36419737339019775", "0.09717650711536407"]
|
|
1881
|
+
],
|
|
1882
|
+
type: "tabular"
|
|
1883
|
+
}
|
|
1884
|
+
]
|
|
1885
|
+
},
|
|
1886
|
+
metrics: [],
|
|
1887
|
+
models: [
|
|
1888
|
+
{
|
|
1889
|
+
description: "A powerful image feature extraction model.",
|
|
1890
|
+
id: "timm/vit_large_patch14_dinov2.lvd142m"
|
|
1891
|
+
},
|
|
1892
|
+
{
|
|
1893
|
+
description: "A strong image feature extraction model.",
|
|
1894
|
+
id: "google/vit-base-patch16-224-in21k"
|
|
1895
|
+
},
|
|
1896
|
+
{
|
|
1897
|
+
description: "A robust image feature extraction models.",
|
|
1898
|
+
id: "facebook/dino-vitb16"
|
|
1899
|
+
}
|
|
1900
|
+
],
|
|
1901
|
+
spaces: [],
|
|
1902
|
+
summary: "Image feature extraction is the task of extracting features learnt in a computer vision model.",
|
|
1903
|
+
widgetModels: []
|
|
1904
|
+
};
|
|
1905
|
+
var data_default8 = taskData8;
|
|
1906
|
+
|
|
1907
|
+
// src/tasks/image-to-image/data.ts
|
|
1908
|
+
var taskData9 = {
|
|
1852
1909
|
datasets: [
|
|
1853
1910
|
{
|
|
1854
1911
|
description: "Synthetic dataset, for image relighting",
|
|
@@ -1940,10 +1997,10 @@ var taskData8 = {
|
|
|
1940
1997
|
widgetModels: ["lllyasviel/sd-controlnet-canny"],
|
|
1941
1998
|
youtubeId: ""
|
|
1942
1999
|
};
|
|
1943
|
-
var
|
|
2000
|
+
var data_default9 = taskData9;
|
|
1944
2001
|
|
|
1945
2002
|
// src/tasks/image-to-text/data.ts
|
|
1946
|
-
var
|
|
2003
|
+
var taskData10 = {
|
|
1947
2004
|
datasets: [
|
|
1948
2005
|
{
|
|
1949
2006
|
// TODO write proper description
|
|
@@ -2020,10 +2077,10 @@ var taskData9 = {
|
|
|
2020
2077
|
widgetModels: ["Salesforce/blip-image-captioning-base"],
|
|
2021
2078
|
youtubeId: ""
|
|
2022
2079
|
};
|
|
2023
|
-
var
|
|
2080
|
+
var data_default10 = taskData10;
|
|
2024
2081
|
|
|
2025
2082
|
// src/tasks/image-segmentation/data.ts
|
|
2026
|
-
var
|
|
2083
|
+
var taskData11 = {
|
|
2027
2084
|
datasets: [
|
|
2028
2085
|
{
|
|
2029
2086
|
description: "Scene segmentation dataset.",
|
|
@@ -2115,10 +2172,10 @@ var taskData10 = {
|
|
|
2115
2172
|
widgetModels: ["facebook/detr-resnet-50-panoptic"],
|
|
2116
2173
|
youtubeId: "dKE8SIt9C-w"
|
|
2117
2174
|
};
|
|
2118
|
-
var
|
|
2175
|
+
var data_default11 = taskData11;
|
|
2119
2176
|
|
|
2120
2177
|
// src/tasks/mask-generation/data.ts
|
|
2121
|
-
var
|
|
2178
|
+
var taskData12 = {
|
|
2122
2179
|
datasets: [],
|
|
2123
2180
|
demo: {
|
|
2124
2181
|
inputs: [
|
|
@@ -2167,10 +2224,10 @@ var taskData11 = {
|
|
|
2167
2224
|
widgetModels: [],
|
|
2168
2225
|
youtubeId: ""
|
|
2169
2226
|
};
|
|
2170
|
-
var
|
|
2227
|
+
var data_default12 = taskData12;
|
|
2171
2228
|
|
|
2172
2229
|
// src/tasks/object-detection/data.ts
|
|
2173
|
-
var
|
|
2230
|
+
var taskData13 = {
|
|
2174
2231
|
datasets: [
|
|
2175
2232
|
{
|
|
2176
2233
|
// TODO write proper description
|
|
@@ -2242,10 +2299,10 @@ var taskData12 = {
|
|
|
2242
2299
|
widgetModels: ["facebook/detr-resnet-50"],
|
|
2243
2300
|
youtubeId: "WdAeKSOpxhw"
|
|
2244
2301
|
};
|
|
2245
|
-
var
|
|
2302
|
+
var data_default13 = taskData13;
|
|
2246
2303
|
|
|
2247
2304
|
// src/tasks/depth-estimation/data.ts
|
|
2248
|
-
var
|
|
2305
|
+
var taskData14 = {
|
|
2249
2306
|
datasets: [
|
|
2250
2307
|
{
|
|
2251
2308
|
description: "NYU Depth V2 Dataset: Video dataset containing both RGB and depth sensor data",
|
|
@@ -2299,10 +2356,10 @@ var taskData13 = {
|
|
|
2299
2356
|
widgetModels: [""],
|
|
2300
2357
|
youtubeId: ""
|
|
2301
2358
|
};
|
|
2302
|
-
var
|
|
2359
|
+
var data_default14 = taskData14;
|
|
2303
2360
|
|
|
2304
2361
|
// src/tasks/placeholder/data.ts
|
|
2305
|
-
var
|
|
2362
|
+
var taskData15 = {
|
|
2306
2363
|
datasets: [],
|
|
2307
2364
|
demo: {
|
|
2308
2365
|
inputs: [],
|
|
@@ -2319,10 +2376,10 @@ var taskData14 = {
|
|
|
2319
2376
|
/// (eg, text2text-generation is the canonical ID of translation)
|
|
2320
2377
|
canonicalId: void 0
|
|
2321
2378
|
};
|
|
2322
|
-
var
|
|
2379
|
+
var data_default15 = taskData15;
|
|
2323
2380
|
|
|
2324
2381
|
// src/tasks/reinforcement-learning/data.ts
|
|
2325
|
-
var
|
|
2382
|
+
var taskData16 = {
|
|
2326
2383
|
datasets: [
|
|
2327
2384
|
{
|
|
2328
2385
|
description: "A curation of widely used datasets for Data Driven Deep Reinforcement Learning (D4RL)",
|
|
@@ -2388,10 +2445,10 @@ var taskData15 = {
|
|
|
2388
2445
|
widgetModels: [],
|
|
2389
2446
|
youtubeId: "q0BiUn5LiBc"
|
|
2390
2447
|
};
|
|
2391
|
-
var
|
|
2448
|
+
var data_default16 = taskData16;
|
|
2392
2449
|
|
|
2393
2450
|
// src/tasks/question-answering/data.ts
|
|
2394
|
-
var
|
|
2451
|
+
var taskData17 = {
|
|
2395
2452
|
datasets: [
|
|
2396
2453
|
{
|
|
2397
2454
|
// TODO write proper description
|
|
@@ -2455,10 +2512,10 @@ var taskData16 = {
|
|
|
2455
2512
|
widgetModels: ["deepset/roberta-base-squad2"],
|
|
2456
2513
|
youtubeId: "ajPx5LwJD-I"
|
|
2457
2514
|
};
|
|
2458
|
-
var
|
|
2515
|
+
var data_default17 = taskData17;
|
|
2459
2516
|
|
|
2460
2517
|
// src/tasks/sentence-similarity/data.ts
|
|
2461
|
-
var
|
|
2518
|
+
var taskData18 = {
|
|
2462
2519
|
datasets: [
|
|
2463
2520
|
{
|
|
2464
2521
|
description: "Bing queries with relevant passages from various web sources.",
|
|
@@ -2550,10 +2607,10 @@ var taskData17 = {
|
|
|
2550
2607
|
widgetModels: ["sentence-transformers/all-MiniLM-L6-v2"],
|
|
2551
2608
|
youtubeId: "VCZq5AkbNEU"
|
|
2552
2609
|
};
|
|
2553
|
-
var
|
|
2610
|
+
var data_default18 = taskData18;
|
|
2554
2611
|
|
|
2555
2612
|
// src/tasks/summarization/data.ts
|
|
2556
|
-
var
|
|
2613
|
+
var taskData19 = {
|
|
2557
2614
|
canonicalId: "text2text-generation",
|
|
2558
2615
|
datasets: [
|
|
2559
2616
|
{
|
|
@@ -2619,10 +2676,10 @@ var taskData18 = {
|
|
|
2619
2676
|
widgetModels: ["sshleifer/distilbart-cnn-12-6"],
|
|
2620
2677
|
youtubeId: "yHnr5Dk2zCI"
|
|
2621
2678
|
};
|
|
2622
|
-
var
|
|
2679
|
+
var data_default19 = taskData19;
|
|
2623
2680
|
|
|
2624
2681
|
// src/tasks/table-question-answering/data.ts
|
|
2625
|
-
var
|
|
2682
|
+
var taskData20 = {
|
|
2626
2683
|
datasets: [
|
|
2627
2684
|
{
|
|
2628
2685
|
description: "The WikiTableQuestions dataset is a large-scale dataset for the task of question answering on semi-structured tables.",
|
|
@@ -2673,10 +2730,10 @@ var taskData19 = {
|
|
|
2673
2730
|
summary: "Table Question Answering (Table QA) is the answering a question about an information on a given table.",
|
|
2674
2731
|
widgetModels: ["google/tapas-base-finetuned-wtq"]
|
|
2675
2732
|
};
|
|
2676
|
-
var
|
|
2733
|
+
var data_default20 = taskData20;
|
|
2677
2734
|
|
|
2678
2735
|
// src/tasks/tabular-classification/data.ts
|
|
2679
|
-
var
|
|
2736
|
+
var taskData21 = {
|
|
2680
2737
|
datasets: [
|
|
2681
2738
|
{
|
|
2682
2739
|
description: "A comprehensive curation of datasets covering all benchmarks.",
|
|
@@ -2740,10 +2797,10 @@ var taskData20 = {
|
|
|
2740
2797
|
widgetModels: ["scikit-learn/tabular-playground"],
|
|
2741
2798
|
youtubeId: ""
|
|
2742
2799
|
};
|
|
2743
|
-
var
|
|
2800
|
+
var data_default21 = taskData21;
|
|
2744
2801
|
|
|
2745
2802
|
// src/tasks/tabular-regression/data.ts
|
|
2746
|
-
var
|
|
2803
|
+
var taskData22 = {
|
|
2747
2804
|
datasets: [
|
|
2748
2805
|
{
|
|
2749
2806
|
description: "A comprehensive curation of datasets covering all benchmarks.",
|
|
@@ -2795,10 +2852,10 @@ var taskData21 = {
|
|
|
2795
2852
|
widgetModels: ["scikit-learn/Fish-Weight"],
|
|
2796
2853
|
youtubeId: ""
|
|
2797
2854
|
};
|
|
2798
|
-
var
|
|
2855
|
+
var data_default22 = taskData22;
|
|
2799
2856
|
|
|
2800
2857
|
// src/tasks/text-to-image/data.ts
|
|
2801
|
-
var
|
|
2858
|
+
var taskData23 = {
|
|
2802
2859
|
datasets: [
|
|
2803
2860
|
{
|
|
2804
2861
|
description: "RedCaps is a large-scale dataset of 12M image-text pairs collected from Reddit.",
|
|
@@ -2890,10 +2947,10 @@ var taskData22 = {
|
|
|
2890
2947
|
widgetModels: ["CompVis/stable-diffusion-v1-4"],
|
|
2891
2948
|
youtubeId: ""
|
|
2892
2949
|
};
|
|
2893
|
-
var
|
|
2950
|
+
var data_default23 = taskData23;
|
|
2894
2951
|
|
|
2895
2952
|
// src/tasks/text-to-speech/data.ts
|
|
2896
|
-
var
|
|
2953
|
+
var taskData24 = {
|
|
2897
2954
|
canonicalId: "text-to-audio",
|
|
2898
2955
|
datasets: [
|
|
2899
2956
|
{
|
|
@@ -2958,10 +3015,10 @@ var taskData23 = {
|
|
|
2958
3015
|
widgetModels: ["suno/bark"],
|
|
2959
3016
|
youtubeId: "NW62DpzJ274"
|
|
2960
3017
|
};
|
|
2961
|
-
var
|
|
3018
|
+
var data_default24 = taskData24;
|
|
2962
3019
|
|
|
2963
3020
|
// src/tasks/token-classification/data.ts
|
|
2964
|
-
var
|
|
3021
|
+
var taskData25 = {
|
|
2965
3022
|
datasets: [
|
|
2966
3023
|
{
|
|
2967
3024
|
description: "A widely used dataset useful to benchmark named entity recognition models.",
|
|
@@ -3037,10 +3094,10 @@ var taskData24 = {
|
|
|
3037
3094
|
widgetModels: ["dslim/bert-base-NER"],
|
|
3038
3095
|
youtubeId: "wVHdVlPScxA"
|
|
3039
3096
|
};
|
|
3040
|
-
var
|
|
3097
|
+
var data_default25 = taskData25;
|
|
3041
3098
|
|
|
3042
3099
|
// src/tasks/translation/data.ts
|
|
3043
|
-
var
|
|
3100
|
+
var taskData26 = {
|
|
3044
3101
|
canonicalId: "text2text-generation",
|
|
3045
3102
|
datasets: [
|
|
3046
3103
|
{
|
|
@@ -3102,10 +3159,10 @@ var taskData25 = {
|
|
|
3102
3159
|
widgetModels: ["t5-small"],
|
|
3103
3160
|
youtubeId: "1JvfrvZgi6c"
|
|
3104
3161
|
};
|
|
3105
|
-
var
|
|
3162
|
+
var data_default26 = taskData26;
|
|
3106
3163
|
|
|
3107
3164
|
// src/tasks/text-classification/data.ts
|
|
3108
|
-
var
|
|
3165
|
+
var taskData27 = {
|
|
3109
3166
|
datasets: [
|
|
3110
3167
|
{
|
|
3111
3168
|
description: "A widely used dataset used to benchmark multiple variants of text classification.",
|
|
@@ -3190,10 +3247,10 @@ var taskData26 = {
|
|
|
3190
3247
|
widgetModels: ["distilbert-base-uncased-finetuned-sst-2-english"],
|
|
3191
3248
|
youtubeId: "leNG9fN9FQU"
|
|
3192
3249
|
};
|
|
3193
|
-
var
|
|
3250
|
+
var data_default27 = taskData27;
|
|
3194
3251
|
|
|
3195
3252
|
// src/tasks/text-generation/data.ts
|
|
3196
|
-
var
|
|
3253
|
+
var taskData28 = {
|
|
3197
3254
|
datasets: [
|
|
3198
3255
|
{
|
|
3199
3256
|
description: "A large multilingual dataset of text crawled from the web.",
|
|
@@ -3294,10 +3351,10 @@ var taskData27 = {
|
|
|
3294
3351
|
widgetModels: ["HuggingFaceH4/zephyr-7b-beta"],
|
|
3295
3352
|
youtubeId: "Vpjb1lu0MDk"
|
|
3296
3353
|
};
|
|
3297
|
-
var
|
|
3354
|
+
var data_default28 = taskData28;
|
|
3298
3355
|
|
|
3299
3356
|
// src/tasks/text-to-video/data.ts
|
|
3300
|
-
var
|
|
3357
|
+
var taskData29 = {
|
|
3301
3358
|
datasets: [
|
|
3302
3359
|
{
|
|
3303
3360
|
description: "Microsoft Research Video to Text is a large-scale dataset for open domain video captioning",
|
|
@@ -3389,10 +3446,10 @@ var taskData28 = {
|
|
|
3389
3446
|
widgetModels: [],
|
|
3390
3447
|
youtubeId: void 0
|
|
3391
3448
|
};
|
|
3392
|
-
var
|
|
3449
|
+
var data_default29 = taskData29;
|
|
3393
3450
|
|
|
3394
3451
|
// src/tasks/unconditional-image-generation/data.ts
|
|
3395
|
-
var
|
|
3452
|
+
var taskData30 = {
|
|
3396
3453
|
datasets: [
|
|
3397
3454
|
{
|
|
3398
3455
|
description: "The CIFAR-100 dataset consists of 60000 32x32 colour images in 100 classes, with 600 images per class.",
|
|
@@ -3454,10 +3511,10 @@ var taskData29 = {
|
|
|
3454
3511
|
// TODO: Add related video
|
|
3455
3512
|
youtubeId: ""
|
|
3456
3513
|
};
|
|
3457
|
-
var
|
|
3514
|
+
var data_default30 = taskData30;
|
|
3458
3515
|
|
|
3459
3516
|
// src/tasks/video-classification/data.ts
|
|
3460
|
-
var
|
|
3517
|
+
var taskData31 = {
|
|
3461
3518
|
datasets: [
|
|
3462
3519
|
{
|
|
3463
3520
|
// TODO write proper description
|
|
@@ -3536,10 +3593,10 @@ var taskData30 = {
|
|
|
3536
3593
|
widgetModels: [],
|
|
3537
3594
|
youtubeId: ""
|
|
3538
3595
|
};
|
|
3539
|
-
var
|
|
3596
|
+
var data_default31 = taskData31;
|
|
3540
3597
|
|
|
3541
3598
|
// src/tasks/visual-question-answering/data.ts
|
|
3542
|
-
var
|
|
3599
|
+
var taskData32 = {
|
|
3543
3600
|
datasets: [
|
|
3544
3601
|
{
|
|
3545
3602
|
description: "A widely used dataset containing questions (with answers) about images.",
|
|
@@ -3629,10 +3686,10 @@ var taskData31 = {
|
|
|
3629
3686
|
widgetModels: ["dandelin/vilt-b32-finetuned-vqa"],
|
|
3630
3687
|
youtubeId: ""
|
|
3631
3688
|
};
|
|
3632
|
-
var
|
|
3689
|
+
var data_default32 = taskData32;
|
|
3633
3690
|
|
|
3634
3691
|
// src/tasks/zero-shot-classification/data.ts
|
|
3635
|
-
var
|
|
3692
|
+
var taskData33 = {
|
|
3636
3693
|
datasets: [
|
|
3637
3694
|
{
|
|
3638
3695
|
description: "A widely used dataset used to benchmark multiple variants of text classification.",
|
|
@@ -3691,10 +3748,10 @@ var taskData32 = {
|
|
|
3691
3748
|
summary: "Zero-shot text classification is a task in natural language processing where a model is trained on a set of labeled examples but is then able to classify new examples from previously unseen classes.",
|
|
3692
3749
|
widgetModels: ["facebook/bart-large-mnli"]
|
|
3693
3750
|
};
|
|
3694
|
-
var
|
|
3751
|
+
var data_default33 = taskData33;
|
|
3695
3752
|
|
|
3696
3753
|
// src/tasks/zero-shot-image-classification/data.ts
|
|
3697
|
-
var
|
|
3754
|
+
var taskData34 = {
|
|
3698
3755
|
datasets: [
|
|
3699
3756
|
{
|
|
3700
3757
|
// TODO write proper description
|
|
@@ -3768,10 +3825,10 @@ var taskData33 = {
|
|
|
3768
3825
|
widgetModels: ["openai/clip-vit-large-patch14-336"],
|
|
3769
3826
|
youtubeId: ""
|
|
3770
3827
|
};
|
|
3771
|
-
var
|
|
3828
|
+
var data_default34 = taskData34;
|
|
3772
3829
|
|
|
3773
3830
|
// src/tasks/zero-shot-object-detection/data.ts
|
|
3774
|
-
var
|
|
3831
|
+
var taskData35 = {
|
|
3775
3832
|
datasets: [],
|
|
3776
3833
|
demo: {
|
|
3777
3834
|
inputs: [
|
|
@@ -3826,7 +3883,7 @@ var taskData34 = {
|
|
|
3826
3883
|
widgetModels: [],
|
|
3827
3884
|
youtubeId: ""
|
|
3828
3885
|
};
|
|
3829
|
-
var
|
|
3886
|
+
var data_default35 = taskData35;
|
|
3830
3887
|
|
|
3831
3888
|
// src/tasks/index.ts
|
|
3832
3889
|
var TASKS_MODEL_LIBRARIES = {
|
|
@@ -3888,7 +3945,7 @@ var TASKS_MODEL_LIBRARIES = {
|
|
|
3888
3945
|
"text-to-3d": [],
|
|
3889
3946
|
"image-to-3d": []
|
|
3890
3947
|
};
|
|
3891
|
-
function getData(type, partialTaskData =
|
|
3948
|
+
function getData(type, partialTaskData = data_default15) {
|
|
3892
3949
|
return {
|
|
3893
3950
|
...partialTaskData,
|
|
3894
3951
|
id: type,
|
|
@@ -3900,52 +3957,52 @@ var TASKS_DATA = {
|
|
|
3900
3957
|
"audio-classification": getData("audio-classification", data_default),
|
|
3901
3958
|
"audio-to-audio": getData("audio-to-audio", data_default2),
|
|
3902
3959
|
"automatic-speech-recognition": getData("automatic-speech-recognition", data_default3),
|
|
3903
|
-
"depth-estimation": getData("depth-estimation",
|
|
3960
|
+
"depth-estimation": getData("depth-estimation", data_default14),
|
|
3904
3961
|
"document-question-answering": getData("document-question-answering", data_default4),
|
|
3905
3962
|
"feature-extraction": getData("feature-extraction", data_default5),
|
|
3906
3963
|
"fill-mask": getData("fill-mask", data_default6),
|
|
3907
3964
|
"graph-ml": void 0,
|
|
3908
3965
|
"image-classification": getData("image-classification", data_default7),
|
|
3909
|
-
"image-
|
|
3966
|
+
"image-feature-extraction": getData("image-feature-extraction", data_default8),
|
|
3967
|
+
"image-segmentation": getData("image-segmentation", data_default11),
|
|
3910
3968
|
"image-text-to-text": void 0,
|
|
3911
|
-
"image-to-image": getData("image-to-image",
|
|
3912
|
-
"image-to-text": getData("image-to-text",
|
|
3969
|
+
"image-to-image": getData("image-to-image", data_default9),
|
|
3970
|
+
"image-to-text": getData("image-to-text", data_default10),
|
|
3913
3971
|
"image-to-video": void 0,
|
|
3914
|
-
"mask-generation": getData("mask-generation",
|
|
3972
|
+
"mask-generation": getData("mask-generation", data_default12),
|
|
3915
3973
|
"multiple-choice": void 0,
|
|
3916
|
-
"object-detection": getData("object-detection",
|
|
3917
|
-
"video-classification": getData("video-classification",
|
|
3974
|
+
"object-detection": getData("object-detection", data_default13),
|
|
3975
|
+
"video-classification": getData("video-classification", data_default31),
|
|
3918
3976
|
other: void 0,
|
|
3919
|
-
"question-answering": getData("question-answering",
|
|
3920
|
-
"reinforcement-learning": getData("reinforcement-learning",
|
|
3977
|
+
"question-answering": getData("question-answering", data_default17),
|
|
3978
|
+
"reinforcement-learning": getData("reinforcement-learning", data_default16),
|
|
3921
3979
|
robotics: void 0,
|
|
3922
|
-
"sentence-similarity": getData("sentence-similarity",
|
|
3923
|
-
summarization: getData("summarization",
|
|
3924
|
-
"table-question-answering": getData("table-question-answering",
|
|
3980
|
+
"sentence-similarity": getData("sentence-similarity", data_default18),
|
|
3981
|
+
summarization: getData("summarization", data_default19),
|
|
3982
|
+
"table-question-answering": getData("table-question-answering", data_default20),
|
|
3925
3983
|
"table-to-text": void 0,
|
|
3926
|
-
"tabular-classification": getData("tabular-classification",
|
|
3927
|
-
"tabular-regression": getData("tabular-regression",
|
|
3984
|
+
"tabular-classification": getData("tabular-classification", data_default21),
|
|
3985
|
+
"tabular-regression": getData("tabular-regression", data_default22),
|
|
3928
3986
|
"tabular-to-text": void 0,
|
|
3929
|
-
"text-classification": getData("text-classification",
|
|
3930
|
-
"text-generation": getData("text-generation",
|
|
3987
|
+
"text-classification": getData("text-classification", data_default27),
|
|
3988
|
+
"text-generation": getData("text-generation", data_default28),
|
|
3931
3989
|
"text-retrieval": void 0,
|
|
3932
|
-
"text-to-image": getData("text-to-image",
|
|
3933
|
-
"text-to-speech": getData("text-to-speech",
|
|
3990
|
+
"text-to-image": getData("text-to-image", data_default23),
|
|
3991
|
+
"text-to-speech": getData("text-to-speech", data_default24),
|
|
3934
3992
|
"text-to-audio": void 0,
|
|
3935
|
-
"text-to-video": getData("text-to-video",
|
|
3993
|
+
"text-to-video": getData("text-to-video", data_default29),
|
|
3936
3994
|
"text2text-generation": void 0,
|
|
3937
3995
|
"time-series-forecasting": void 0,
|
|
3938
|
-
"token-classification": getData("token-classification",
|
|
3939
|
-
translation: getData("translation",
|
|
3940
|
-
"unconditional-image-generation": getData("unconditional-image-generation",
|
|
3941
|
-
"visual-question-answering": getData("visual-question-answering",
|
|
3996
|
+
"token-classification": getData("token-classification", data_default25),
|
|
3997
|
+
translation: getData("translation", data_default26),
|
|
3998
|
+
"unconditional-image-generation": getData("unconditional-image-generation", data_default30),
|
|
3999
|
+
"visual-question-answering": getData("visual-question-answering", data_default32),
|
|
3942
4000
|
"voice-activity-detection": void 0,
|
|
3943
|
-
"zero-shot-classification": getData("zero-shot-classification",
|
|
3944
|
-
"zero-shot-image-classification": getData("zero-shot-image-classification",
|
|
3945
|
-
"zero-shot-object-detection": getData("zero-shot-object-detection",
|
|
3946
|
-
"text-to-3d": getData("text-to-3d",
|
|
3947
|
-
"image-to-3d": getData("image-to-3d",
|
|
3948
|
-
"image-feature-extraction": getData("image-feature-extraction", data_default14)
|
|
4001
|
+
"zero-shot-classification": getData("zero-shot-classification", data_default33),
|
|
4002
|
+
"zero-shot-image-classification": getData("zero-shot-image-classification", data_default34),
|
|
4003
|
+
"zero-shot-object-detection": getData("zero-shot-object-detection", data_default35),
|
|
4004
|
+
"text-to-3d": getData("text-to-3d", data_default15),
|
|
4005
|
+
"image-to-3d": getData("image-to-3d", data_default15)
|
|
3949
4006
|
};
|
|
3950
4007
|
|
|
3951
4008
|
// src/model-libraries-snippets.ts
|
|
@@ -4078,6 +4135,13 @@ var keras = (model) => [
|
|
|
4078
4135
|
model = from_pretrained_keras("${model.id}")
|
|
4079
4136
|
`
|
|
4080
4137
|
];
|
|
4138
|
+
var keras_nlp = (model) => [
|
|
4139
|
+
`import keras_nlp
|
|
4140
|
+
|
|
4141
|
+
tokenizer = keras_nlp.models.Tokenizer.from_preset("hf://${model.id}")
|
|
4142
|
+
backbone = keras_nlp.models.Backbone.from_preset("hf://${model.id}")
|
|
4143
|
+
`
|
|
4144
|
+
];
|
|
4081
4145
|
var open_clip = (model) => [
|
|
4082
4146
|
`import open_clip
|
|
4083
4147
|
|
|
@@ -4412,6 +4476,11 @@ IWorker engine = WorkerFactory.CreateWorker(BackendType.GPUCompute, model);
|
|
|
4412
4476
|
// Please see provided C# file for more details
|
|
4413
4477
|
`
|
|
4414
4478
|
];
|
|
4479
|
+
var voicecraft = (model) => [
|
|
4480
|
+
`from voicecraft import VoiceCraft
|
|
4481
|
+
|
|
4482
|
+
model = VoiceCraft.from_pretrained("${model.id}")`
|
|
4483
|
+
];
|
|
4415
4484
|
var mlx = (model) => [
|
|
4416
4485
|
`pip install huggingface_hub hf_transfer
|
|
4417
4486
|
|
|
@@ -4600,6 +4669,13 @@ var MODEL_LIBRARIES_UI_ELEMENTS = {
|
|
|
4600
4669
|
filter: true,
|
|
4601
4670
|
countDownloads: { term: { path: "saved_model.pb" } }
|
|
4602
4671
|
},
|
|
4672
|
+
"keras-nlp": {
|
|
4673
|
+
prettyLabel: "KerasNLP",
|
|
4674
|
+
repoName: "KerasNLP",
|
|
4675
|
+
repoUrl: "https://keras.io/keras_nlp/",
|
|
4676
|
+
docsUrl: "https://github.com/keras-team/keras-nlp",
|
|
4677
|
+
snippets: keras_nlp
|
|
4678
|
+
},
|
|
4603
4679
|
k2: {
|
|
4604
4680
|
prettyLabel: "K2",
|
|
4605
4681
|
repoName: "k2",
|
|
@@ -4816,6 +4892,13 @@ var MODEL_LIBRARIES_UI_ELEMENTS = {
|
|
|
4816
4892
|
wildcard: { path: "*.sentis" }
|
|
4817
4893
|
}
|
|
4818
4894
|
},
|
|
4895
|
+
voicecraft: {
|
|
4896
|
+
prettyLabel: "VoiceCraft",
|
|
4897
|
+
repoName: "VoiceCraft",
|
|
4898
|
+
repoUrl: "https://github.com/jasonppy/VoiceCraft",
|
|
4899
|
+
docsUrl: "https://github.com/jasonppy/VoiceCraft",
|
|
4900
|
+
snippets: voicecraft
|
|
4901
|
+
},
|
|
4819
4902
|
whisperkit: {
|
|
4820
4903
|
prettyLabel: "WhisperKit",
|
|
4821
4904
|
repoName: "WhisperKit",
|
package/package.json
CHANGED
package/src/library-to-tasks.ts
CHANGED
|
@@ -6,7 +6,7 @@ import type { PipelineType } from "./pipelines";
|
|
|
6
6
|
* Inference API (serverless) should be disabled for all other (library, task) pairs beyond this mapping.
|
|
7
7
|
* This mapping is partially generated automatically by "python-api-export-tasks" action in
|
|
8
8
|
* huggingface/api-inference-community repo upon merge. For transformers, the mapping is manually
|
|
9
|
-
* based on api-inference.
|
|
9
|
+
* based on api-inference (hf_types.rs).
|
|
10
10
|
*/
|
|
11
11
|
export const LIBRARY_TASK_MAPPING: Partial<Record<ModelLibraryKey, PipelineType[]>> = {
|
|
12
12
|
"adapter-transformers": ["question-answering", "text-classification", "token-classification"],
|
|
@@ -53,12 +53,20 @@ export const LIBRARY_TASK_MAPPING: Partial<Record<ModelLibraryKey, PipelineType[
|
|
|
53
53
|
"fill-mask",
|
|
54
54
|
"image-classification",
|
|
55
55
|
"image-segmentation",
|
|
56
|
-
"image-to-text",
|
|
57
56
|
"image-to-image",
|
|
57
|
+
"image-to-text",
|
|
58
58
|
"object-detection",
|
|
59
59
|
"question-answering",
|
|
60
|
-
"
|
|
60
|
+
"summarization",
|
|
61
|
+
"table-question-answering",
|
|
61
62
|
"text2text-generation",
|
|
63
|
+
"text-classification",
|
|
64
|
+
"text-generation",
|
|
65
|
+
"text-to-audio",
|
|
66
|
+
"text-to-speech",
|
|
67
|
+
"token-classification",
|
|
68
|
+
"translation",
|
|
69
|
+
"video-classification",
|
|
62
70
|
"visual-question-answering",
|
|
63
71
|
"zero-shot-classification",
|
|
64
72
|
"zero-shot-image-classification",
|
|
@@ -153,6 +153,14 @@ model = from_pretrained_keras("${model.id}")
|
|
|
153
153
|
`,
|
|
154
154
|
];
|
|
155
155
|
|
|
156
|
+
export const keras_nlp = (model: ModelData): string[] => [
|
|
157
|
+
`import keras_nlp
|
|
158
|
+
|
|
159
|
+
tokenizer = keras_nlp.models.Tokenizer.from_preset("hf://${model.id}")
|
|
160
|
+
backbone = keras_nlp.models.Backbone.from_preset("hf://${model.id}")
|
|
161
|
+
`,
|
|
162
|
+
];
|
|
163
|
+
|
|
156
164
|
export const open_clip = (model: ModelData): string[] => [
|
|
157
165
|
`import open_clip
|
|
158
166
|
|
|
@@ -531,6 +539,12 @@ IWorker engine = WorkerFactory.CreateWorker(BackendType.GPUCompute, model);
|
|
|
531
539
|
`,
|
|
532
540
|
];
|
|
533
541
|
|
|
542
|
+
export const voicecraft = (model: ModelData): string[] => [
|
|
543
|
+
`from voicecraft import VoiceCraft
|
|
544
|
+
|
|
545
|
+
model = VoiceCraft.from_pretrained("${model.id}")`,
|
|
546
|
+
];
|
|
547
|
+
|
|
534
548
|
export const mlx = (model: ModelData): string[] => [
|
|
535
549
|
`pip install huggingface_hub hf_transfer
|
|
536
550
|
|
package/src/model-libraries.ts
CHANGED
|
@@ -185,6 +185,13 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
|
|
|
185
185
|
filter: true,
|
|
186
186
|
countDownloads: { term: { path: "saved_model.pb" } },
|
|
187
187
|
},
|
|
188
|
+
"keras-nlp": {
|
|
189
|
+
prettyLabel: "KerasNLP",
|
|
190
|
+
repoName: "KerasNLP",
|
|
191
|
+
repoUrl: "https://keras.io/keras_nlp/",
|
|
192
|
+
docsUrl: "https://github.com/keras-team/keras-nlp",
|
|
193
|
+
snippets: snippets.keras_nlp,
|
|
194
|
+
},
|
|
188
195
|
k2: {
|
|
189
196
|
prettyLabel: "K2",
|
|
190
197
|
repoName: "k2",
|
|
@@ -401,6 +408,13 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
|
|
|
401
408
|
wildcard: { path: "*.sentis" },
|
|
402
409
|
},
|
|
403
410
|
},
|
|
411
|
+
voicecraft: {
|
|
412
|
+
prettyLabel: "VoiceCraft",
|
|
413
|
+
repoName: "VoiceCraft",
|
|
414
|
+
repoUrl: "https://github.com/jasonppy/VoiceCraft",
|
|
415
|
+
docsUrl: "https://github.com/jasonppy/VoiceCraft",
|
|
416
|
+
snippets: snippets.voicecraft,
|
|
417
|
+
},
|
|
404
418
|
whisperkit: {
|
|
405
419
|
prettyLabel: "WhisperKit",
|
|
406
420
|
repoName: "WhisperKit",
|