@huggingface/tasks 0.2.2 → 0.3.1
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/README.md +1 -1
- package/dist/index.cjs +3144 -3085
- package/dist/index.d.ts +441 -74
- package/dist/index.js +3143 -3084
- package/package.json +1 -1
- package/src/index.ts +2 -5
- package/src/library-to-tasks.ts +1 -1
- package/src/model-libraries-downloads.ts +20 -0
- package/src/{library-ui-elements.ts → model-libraries-snippets.ts} +46 -292
- package/src/model-libraries.ts +375 -44
- package/src/pipelines.ts +14 -8
- package/src/tasks/audio-classification/inference.ts +4 -4
- package/src/tasks/audio-classification/spec/input.json +4 -4
- package/src/tasks/audio-classification/spec/output.json +1 -12
- package/src/tasks/automatic-speech-recognition/inference.ts +35 -30
- package/src/tasks/automatic-speech-recognition/spec/input.json +3 -3
- package/src/tasks/automatic-speech-recognition/spec/output.json +30 -28
- package/src/tasks/common-definitions.json +25 -17
- package/src/tasks/depth-estimation/inference.ts +10 -10
- package/src/tasks/depth-estimation/spec/input.json +3 -8
- package/src/tasks/depth-estimation/spec/output.json +9 -3
- package/src/tasks/document-question-answering/inference.ts +16 -8
- package/src/tasks/document-question-answering/spec/input.json +9 -9
- package/src/tasks/document-question-answering/spec/output.json +2 -2
- package/src/tasks/feature-extraction/inference.ts +1 -1
- package/src/tasks/feature-extraction/spec/input.json +2 -2
- package/src/tasks/fill-mask/inference.ts +4 -3
- package/src/tasks/fill-mask/spec/input.json +3 -3
- package/src/tasks/fill-mask/spec/output.json +1 -1
- package/src/tasks/image-classification/inference.ts +3 -3
- package/src/tasks/image-classification/spec/input.json +4 -4
- package/src/tasks/image-segmentation/inference.ts +3 -3
- package/src/tasks/image-segmentation/spec/input.json +4 -4
- package/src/tasks/image-to-image/inference.ts +5 -5
- package/src/tasks/image-to-image/spec/input.json +9 -7
- package/src/tasks/image-to-text/inference.ts +25 -20
- package/src/tasks/image-to-text/spec/input.json +3 -3
- package/src/tasks/image-to-text/spec/output.json +8 -11
- package/src/tasks/index.ts +2 -0
- package/src/tasks/object-detection/inference.ts +1 -1
- package/src/tasks/object-detection/spec/input.json +2 -2
- package/src/tasks/placeholder/spec/input.json +4 -4
- package/src/tasks/placeholder/spec/output.json +1 -1
- package/src/tasks/question-answering/inference.ts +8 -8
- package/src/tasks/question-answering/spec/input.json +9 -9
- package/src/tasks/sentence-similarity/inference.ts +1 -1
- package/src/tasks/sentence-similarity/spec/input.json +2 -2
- package/src/tasks/summarization/inference.ts +5 -4
- package/src/tasks/table-question-answering/inference.ts +1 -1
- package/src/tasks/table-question-answering/spec/input.json +8 -3
- package/src/tasks/text-classification/inference.ts +3 -3
- package/src/tasks/text-classification/spec/input.json +4 -4
- package/src/tasks/text-generation/inference.ts +123 -14
- package/src/tasks/text-generation/spec/input.json +28 -12
- package/src/tasks/text-generation/spec/output.json +112 -9
- package/src/tasks/text-to-audio/inference.ts +24 -19
- package/src/tasks/text-to-audio/spec/input.json +2 -2
- package/src/tasks/text-to-audio/spec/output.json +10 -13
- package/src/tasks/text-to-image/inference.ts +6 -8
- package/src/tasks/text-to-image/spec/input.json +9 -7
- package/src/tasks/text-to-image/spec/output.json +7 -9
- package/src/tasks/text-to-speech/inference.ts +18 -17
- package/src/tasks/text2text-generation/inference.ts +10 -8
- package/src/tasks/text2text-generation/spec/input.json +4 -4
- package/src/tasks/text2text-generation/spec/output.json +8 -11
- package/src/tasks/token-classification/inference.ts +4 -4
- package/src/tasks/token-classification/spec/input.json +4 -4
- package/src/tasks/token-classification/spec/output.json +1 -1
- package/src/tasks/translation/inference.ts +5 -4
- package/src/tasks/video-classification/inference.ts +5 -5
- package/src/tasks/video-classification/spec/input.json +6 -6
- package/src/tasks/visual-question-answering/inference.ts +2 -2
- package/src/tasks/visual-question-answering/spec/input.json +3 -3
- package/src/tasks/zero-shot-classification/inference.ts +3 -3
- package/src/tasks/zero-shot-classification/spec/input.json +4 -4
- package/src/tasks/zero-shot-image-classification/inference.ts +2 -2
- package/src/tasks/zero-shot-image-classification/spec/input.json +3 -3
- package/src/tasks/zero-shot-object-detection/inference.ts +1 -1
- package/src/tasks/zero-shot-object-detection/spec/input.json +2 -2
|
@@ -10,7 +10,7 @@ export interface ZeroShotImageClassificationInput {
|
|
|
10
10
|
/**
|
|
11
11
|
* The input image data, with candidate labels
|
|
12
12
|
*/
|
|
13
|
-
|
|
13
|
+
inputs: ZeroShotImageClassificationInputData;
|
|
14
14
|
/**
|
|
15
15
|
* Additional inference parameters
|
|
16
16
|
*/
|
|
@@ -41,7 +41,7 @@ export interface ZeroShotImageClassificationParameters {
|
|
|
41
41
|
* The sentence used in conjunction with candidateLabels to attempt the text classification
|
|
42
42
|
* by replacing the placeholder with the candidate labels.
|
|
43
43
|
*/
|
|
44
|
-
|
|
44
|
+
hypothesis_template?: string;
|
|
45
45
|
[property: string]: unknown;
|
|
46
46
|
}
|
|
47
47
|
export type ZeroShotImageClassificationOutput = ZeroShotImageClassificationOutputElement[];
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"title": "ZeroShotImageClassificationInput",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"properties": {
|
|
8
|
-
"
|
|
8
|
+
"inputs": {
|
|
9
9
|
"description": "The input image data, with candidate labels",
|
|
10
10
|
"type": "object",
|
|
11
11
|
"title": "ZeroShotImageClassificationInputData",
|
|
@@ -34,12 +34,12 @@
|
|
|
34
34
|
"description": "Additional inference parameters for Zero Shot Image Classification",
|
|
35
35
|
"type": "object",
|
|
36
36
|
"properties": {
|
|
37
|
-
"
|
|
37
|
+
"hypothesis_template": {
|
|
38
38
|
"type": "string",
|
|
39
39
|
"description": "The sentence used in conjunction with candidateLabels to attempt the text classification by replacing the placeholder with the candidate labels."
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
},
|
|
44
|
-
"required": ["
|
|
44
|
+
"required": ["inputs"]
|
|
45
45
|
}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"title": "ZeroShotObjectDetectionInput",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"properties": {
|
|
8
|
-
"
|
|
8
|
+
"inputs": {
|
|
9
9
|
"description": "The input image data, with candidate labels",
|
|
10
10
|
"type": "object",
|
|
11
11
|
"title": "ZeroShotObjectDetectionInputData",
|
|
@@ -36,5 +36,5 @@
|
|
|
36
36
|
"properties": {}
|
|
37
37
|
}
|
|
38
38
|
},
|
|
39
|
-
"required": ["
|
|
39
|
+
"required": ["inputs"]
|
|
40
40
|
}
|