File tree Expand file tree Collapse file tree 20 files changed +64
-171
lines changed
automatic-speech-recognition
document-question-answering
visual-question-answering
zero-shot-image-classification
zero-shot-object-detection Expand file tree Collapse file tree 20 files changed +64
-171
lines changed Original file line number Diff line number Diff line change 3
3
*
4
4
* Using src/scripts/inference-codegen
5
5
*/
6
-
7
6
/**
8
7
* Inputs for Audio Classification inference
9
8
*/
@@ -18,7 +17,6 @@ export interface AudioClassificationInput {
18
17
parameters ?: AudioClassificationParameters ;
19
18
[ property : string ] : unknown ;
20
19
}
21
-
22
20
/**
23
21
* Additional inference parameters
24
22
*
@@ -35,13 +33,12 @@ export interface AudioClassificationParameters {
35
33
topK ?: number ;
36
34
[ property : string ] : unknown ;
37
35
}
38
-
39
36
export type AudioClassificationOutputTransform = "sigmoid" | "softmax" | "none" ;
40
-
37
+ export type AudioClassificationOutput = AudioClassificationOutputElement [ ] ;
41
38
/**
42
39
* Outputs for Audio Classification inference
43
40
*/
44
- export interface AudioClassificationOutput {
41
+ export interface AudioClassificationOutputElement {
45
42
/**
46
43
* The predicted class label (model specific).
47
44
*/
Original file line number Diff line number Diff line change 3
3
*
4
4
* Using src/scripts/inference-codegen
5
5
*/
6
-
7
6
/**
8
7
* Inputs for Automatic Speech Recognition inference
9
8
*/
@@ -15,14 +14,16 @@ export interface AutomaticSpeechRecognitionInput {
15
14
/**
16
15
* Additional inference parameters
17
16
*/
18
- parameters ?: { [ key : string ] : unknown } ;
17
+ parameters ?: {
18
+ [ key : string ] : unknown ;
19
+ } ;
19
20
[ property : string ] : unknown ;
20
21
}
21
-
22
+ export type AutomaticSpeechRecognitionOutput = AutomaticSpeechRecognitionOutputElement [ ] ;
22
23
/**
23
24
* Outputs of inference for the Automatic Speech Recognition task
24
25
*/
25
- export interface AutomaticSpeechRecognitionOutput {
26
+ export interface AutomaticSpeechRecognitionOutputElement {
26
27
/**
27
28
* The recognized text.
28
29
*/
Original file line number Diff line number Diff line change 3
3
*
4
4
* Using src/scripts/inference-codegen
5
5
*/
6
-
7
6
/**
8
7
* Inputs for Document Question Answering inference
9
8
*/
@@ -18,7 +17,6 @@ export interface DocumentQuestionAnsweringInput {
18
17
parameters ?: DocumentQuestionAnsweringParameters ;
19
18
[ property : string ] : unknown ;
20
19
}
21
-
22
20
/**
23
21
* One (document, question) pair to answer
24
22
*/
@@ -33,7 +31,6 @@ export interface DocumentQuestionAnsweringInputData {
33
31
question : string ;
34
32
[ property : string ] : unknown ;
35
33
}
36
-
37
34
/**
38
35
* Additional inference parameters
39
36
*
@@ -81,13 +78,12 @@ export interface DocumentQuestionAnsweringParameters {
81
78
wordBoxes ?: WordBox [ ] ;
82
79
[ property : string ] : unknown ;
83
80
}
84
-
85
81
export type WordBox = number [ ] | string ;
86
-
82
+ export type DocumentQuestionAnsweringOutput = DocumentQuestionAnsweringOutputElement [ ] ;
87
83
/**
88
84
* Outputs of inference for the Document Question Answering task
89
85
*/
90
- export interface DocumentQuestionAnsweringOutput {
86
+ export interface DocumentQuestionAnsweringOutputElement {
91
87
/**
92
88
* The answer to the question.
93
89
*/
Original file line number Diff line number Diff line change 3
3
*
4
4
* Using src/scripts/inference-codegen
5
5
*/
6
-
7
6
/**
8
7
* Inputs for Fill Mask inference
9
8
*/
@@ -18,7 +17,6 @@ export interface FillMaskInput {
18
17
parameters ?: FillMaskParameters ;
19
18
[ property : string ] : unknown ;
20
19
}
21
-
22
20
/**
23
21
* Additional inference parameters
24
22
*
@@ -38,11 +36,11 @@ export interface FillMaskParameters {
38
36
topK ?: number ;
39
37
[ property : string ] : unknown ;
40
38
}
41
-
39
+ export type FillMaskOutput = FillMaskOutputElement [ ] ;
42
40
/**
43
41
* Outputs of inference for the Fill Mask task
44
42
*/
45
- export interface FillMaskOutput {
43
+ export interface FillMaskOutputElement {
46
44
/**
47
45
* The corresponding probability
48
46
*/
Original file line number Diff line number Diff line change 3
3
*
4
4
* Using src/scripts/inference-codegen
5
5
*/
6
-
7
6
/**
8
7
* Inputs for Image Classification inference
9
8
*/
@@ -18,7 +17,6 @@ export interface ImageClassificationInput {
18
17
parameters ?: ImageClassificationParameters ;
19
18
[ property : string ] : unknown ;
20
19
}
21
-
22
20
/**
23
21
* Additional inference parameters
24
22
*
@@ -35,13 +33,12 @@ export interface ImageClassificationParameters {
35
33
topK ?: number ;
36
34
[ property : string ] : unknown ;
37
35
}
38
-
39
36
export type ImageClassificationOutputTransform = "sigmoid" | "softmax" | "none" ;
40
-
37
+ export type ImageClassificationOutput = ImageClassificationOutputElement [ ] ;
41
38
/**
42
39
* Outputs of inference for the Image Classification task
43
40
*/
44
- export interface ImageClassificationOutput {
41
+ export interface ImageClassificationOutputElement {
45
42
/**
46
43
* The predicted class label (model specific).
47
44
*/
Original file line number Diff line number Diff line change 3
3
*
4
4
* Using src/scripts/inference-codegen
5
5
*/
6
-
7
6
/**
8
7
* Inputs for Image Segmentation inference
9
8
*/
@@ -18,7 +17,6 @@ export interface ImageSegmentationInput {
18
17
parameters ?: ImageSegmentationParameters ;
19
18
[ property : string ] : unknown ;
20
19
}
21
-
22
20
/**
23
21
* Additional inference parameters
24
22
*
@@ -43,15 +41,14 @@ export interface ImageSegmentationParameters {
43
41
threshold ?: number ;
44
42
[ property : string ] : unknown ;
45
43
}
46
-
47
44
export type ImageSegmentationSubtask = "instance" | "panoptic" | "semantic" ;
48
-
45
+ export type ImageSegmentationOutput = ImageSegmentationOutputElement [ ] ;
49
46
/**
50
47
* Outputs of inference for the Image Segmentation task
51
48
*
52
49
* A predicted mask / segment
53
50
*/
54
- export interface ImageSegmentationOutput {
51
+ export interface ImageSegmentationOutputElement {
55
52
/**
56
53
* The label of the predicted segment
57
54
*/
Original file line number Diff line number Diff line change 3
3
*
4
4
* Using src/scripts/inference-codegen
5
5
*/
6
-
7
6
/**
8
7
* Inputs for Image To Text inference
9
8
*/
@@ -18,7 +17,6 @@ export interface ImageToTextInput {
18
17
parameters ?: ImageToTextParameters ;
19
18
[ property : string ] : unknown ;
20
19
}
21
-
22
20
/**
23
21
* Additional inference parameters
24
22
*
@@ -31,11 +29,11 @@ export interface ImageToTextParameters {
31
29
maxNewTokens ?: number ;
32
30
[ property : string ] : unknown ;
33
31
}
34
-
32
+ export type ImageToTextOutput = ImageToTextOutputElement [ ] ;
35
33
/**
36
34
* Outputs of inference for the Image To Text task
37
35
*/
38
- export interface ImageToTextOutput {
36
+ export interface ImageToTextOutputElement {
39
37
/**
40
38
* The generated text.
41
39
*/
Original file line number Diff line number Diff line change 3
3
*
4
4
* Using src/scripts/inference-codegen
5
5
*/
6
-
7
6
/**
8
7
* Inputs for Object Detection inference
9
8
*/
@@ -18,7 +17,6 @@ export interface ObjectDetectionInput {
18
17
parameters ?: ObjectDetectionParameters ;
19
18
[ property : string ] : unknown ;
20
19
}
21
-
22
20
/**
23
21
* Additional inference parameters
24
22
*
@@ -31,11 +29,22 @@ export interface ObjectDetectionParameters {
31
29
threshold ?: number ;
32
30
[ property : string ] : unknown ;
33
31
}
34
-
32
+ /**
33
+ * The predicted bounding box. Coordinates are relative to the top left corner of the input
34
+ * image.
35
+ */
36
+ export interface BoundingBox {
37
+ xmax : number ;
38
+ xmin : number ;
39
+ ymax : number ;
40
+ ymin : number ;
41
+ [ property : string ] : unknown ;
42
+ }
43
+ export type ObjectDetectionOutput = ObjectDetectionOutputElement [ ] ;
35
44
/**
36
45
* Outputs of inference for the Object Detection task
37
46
*/
38
- export interface ObjectDetectionOutput {
47
+ export interface ObjectDetectionOutputElement {
39
48
/**
40
49
* The predicted bounding box. Coordinates are relative to the top left corner of the input
41
50
* image.
@@ -51,15 +60,3 @@ export interface ObjectDetectionOutput {
51
60
score : number ;
52
61
[ property : string ] : unknown ;
53
62
}
54
-
55
- /**
56
- * The predicted bounding box. Coordinates are relative to the top left corner of the input
57
- * image.
58
- */
59
- export interface BoundingBox {
60
- xmax : number ;
61
- xmin : number ;
62
- ymax : number ;
63
- ymin : number ;
64
- [ property : string ] : unknown ;
65
- }
Original file line number Diff line number Diff line change 3
3
*
4
4
* Using src/scripts/inference-codegen
5
5
*/
6
-
7
6
/**
8
7
* Inputs for Question Answering inference
9
8
*/
@@ -18,7 +17,6 @@ export interface QuestionAnsweringInput {
18
17
parameters ?: QuestionAnsweringParameters ;
19
18
[ property : string ] : unknown ;
20
19
}
21
-
22
20
/**
23
21
* One (context, question) pair to answer
24
22
*/
@@ -33,7 +31,6 @@ export interface QuestionAnsweringInputData {
33
31
question : string ;
34
32
[ property : string ] : unknown ;
35
33
}
36
-
37
34
/**
38
35
* Additional inference parameters
39
36
*
@@ -77,11 +74,11 @@ export interface QuestionAnsweringParameters {
77
74
topK ?: number ;
78
75
[ property : string ] : unknown ;
79
76
}
80
-
77
+ export type QuestionAnsweringOutput = QuestionAnsweringOutputElement [ ] ;
81
78
/**
82
79
* Outputs of inference for the Question Answering task
83
80
*/
84
- export interface QuestionAnsweringOutput {
81
+ export interface QuestionAnsweringOutputElement {
85
82
/**
86
83
* The answer to the question.
87
84
*/
Original file line number Diff line number Diff line change 3
3
*
4
4
* Using src/scripts/inference-codegen
5
5
*/
6
-
7
6
/**
8
7
* Inputs for Table Question Answering inference
9
8
*/
@@ -15,10 +14,11 @@ export interface TableQuestionAnsweringInput {
15
14
/**
16
15
* Additional inference parameters
17
16
*/
18
- parameters ?: { [ key : string ] : unknown } ;
17
+ parameters ?: {
18
+ [ key : string ] : unknown ;
19
+ } ;
19
20
[ property : string ] : unknown ;
20
21
}
21
-
22
22
/**
23
23
* One (table, question) pair to answer
24
24
*/
@@ -30,14 +30,16 @@ export interface TableQuestionAnsweringInputData {
30
30
/**
31
31
* The table to serve as context for the questions
32
32
*/
33
- table : { [ key : string ] : unknown } ;
33
+ table : {
34
+ [ key : string ] : unknown ;
35
+ } ;
34
36
[ property : string ] : unknown ;
35
37
}
36
-
38
+ export type TableQuestionAnsweringOutput = TableQuestionAnsweringOutputElement [ ] ;
37
39
/**
38
40
* Outputs of inference for the Table Question Answering task
39
41
*/
40
- export interface TableQuestionAnsweringOutput {
42
+ export interface TableQuestionAnsweringOutputElement {
41
43
/**
42
44
* If the model has an aggregator, this returns the aggregator.
43
45
*/
Original file line number Diff line number Diff line change 3
3
*
4
4
* Using src/scripts/inference-codegen
5
5
*/
6
-
7
6
/**
8
7
* Inputs for Text Classification inference
9
8
*/
@@ -18,7 +17,6 @@ export interface TextClassificationInput {
18
17
parameters ?: TextClassificationParameters ;
19
18
[ property : string ] : unknown ;
20
19
}
21
-
22
20
/**
23
21
* Additional inference parameters
24
22
*
@@ -35,13 +33,12 @@ export interface TextClassificationParameters {
35
33
topK ?: number ;
36
34
[ property : string ] : unknown ;
37
35
}
38
-
39
36
export type TextClassificationOutputTransform = "sigmoid" | "softmax" | "none" ;
40
-
37
+ export type TextClassificationOutput = TextClassificationOutputElement [ ] ;
41
38
/**
42
39
* Outputs of inference for the Text Classification task
43
40
*/
44
- export interface TextClassificationOutput {
41
+ export interface TextClassificationOutputElement {
45
42
/**
46
43
* The predicted class label (model specific).
47
44
*/
You can’t perform that action at this time.
0 commit comments