Skip to content

Commit 6b10c4d

Browse files
committed
regenerate code
1 parent 077a88f commit 6b10c4d

File tree

20 files changed

+64
-171
lines changed

20 files changed

+64
-171
lines changed

packages/tasks/src/tasks/audio-classification/inference.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
*
44
* Using src/scripts/inference-codegen
55
*/
6-
76
/**
87
* Inputs for Audio Classification inference
98
*/
@@ -18,7 +17,6 @@ export interface AudioClassificationInput {
1817
parameters?: AudioClassificationParameters;
1918
[property: string]: unknown;
2019
}
21-
2220
/**
2321
* Additional inference parameters
2422
*
@@ -35,13 +33,12 @@ export interface AudioClassificationParameters {
3533
topK?: number;
3634
[property: string]: unknown;
3735
}
38-
3936
export type AudioClassificationOutputTransform = "sigmoid" | "softmax" | "none";
40-
37+
export type AudioClassificationOutput = AudioClassificationOutputElement[];
4138
/**
4239
* Outputs for Audio Classification inference
4340
*/
44-
export interface AudioClassificationOutput {
41+
export interface AudioClassificationOutputElement {
4542
/**
4643
* The predicted class label (model specific).
4744
*/

packages/tasks/src/tasks/automatic-speech-recognition/inference.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
*
44
* Using src/scripts/inference-codegen
55
*/
6-
76
/**
87
* Inputs for Automatic Speech Recognition inference
98
*/
@@ -15,14 +14,16 @@ export interface AutomaticSpeechRecognitionInput {
1514
/**
1615
* Additional inference parameters
1716
*/
18-
parameters?: { [key: string]: unknown };
17+
parameters?: {
18+
[key: string]: unknown;
19+
};
1920
[property: string]: unknown;
2021
}
21-
22+
export type AutomaticSpeechRecognitionOutput = AutomaticSpeechRecognitionOutputElement[];
2223
/**
2324
* Outputs of inference for the Automatic Speech Recognition task
2425
*/
25-
export interface AutomaticSpeechRecognitionOutput {
26+
export interface AutomaticSpeechRecognitionOutputElement {
2627
/**
2728
* The recognized text.
2829
*/

packages/tasks/src/tasks/document-question-answering/inference.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
*
44
* Using src/scripts/inference-codegen
55
*/
6-
76
/**
87
* Inputs for Document Question Answering inference
98
*/
@@ -18,7 +17,6 @@ export interface DocumentQuestionAnsweringInput {
1817
parameters?: DocumentQuestionAnsweringParameters;
1918
[property: string]: unknown;
2019
}
21-
2220
/**
2321
* One (document, question) pair to answer
2422
*/
@@ -33,7 +31,6 @@ export interface DocumentQuestionAnsweringInputData {
3331
question: string;
3432
[property: string]: unknown;
3533
}
36-
3734
/**
3835
* Additional inference parameters
3936
*
@@ -81,13 +78,12 @@ export interface DocumentQuestionAnsweringParameters {
8178
wordBoxes?: WordBox[];
8279
[property: string]: unknown;
8380
}
84-
8581
export type WordBox = number[] | string;
86-
82+
export type DocumentQuestionAnsweringOutput = DocumentQuestionAnsweringOutputElement[];
8783
/**
8884
* Outputs of inference for the Document Question Answering task
8985
*/
90-
export interface DocumentQuestionAnsweringOutput {
86+
export interface DocumentQuestionAnsweringOutputElement {
9187
/**
9288
* The answer to the question.
9389
*/

packages/tasks/src/tasks/fill-mask/inference.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
*
44
* Using src/scripts/inference-codegen
55
*/
6-
76
/**
87
* Inputs for Fill Mask inference
98
*/
@@ -18,7 +17,6 @@ export interface FillMaskInput {
1817
parameters?: FillMaskParameters;
1918
[property: string]: unknown;
2019
}
21-
2220
/**
2321
* Additional inference parameters
2422
*
@@ -38,11 +36,11 @@ export interface FillMaskParameters {
3836
topK?: number;
3937
[property: string]: unknown;
4038
}
41-
39+
export type FillMaskOutput = FillMaskOutputElement[];
4240
/**
4341
* Outputs of inference for the Fill Mask task
4442
*/
45-
export interface FillMaskOutput {
43+
export interface FillMaskOutputElement {
4644
/**
4745
* The corresponding probability
4846
*/

packages/tasks/src/tasks/image-classification/inference.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
*
44
* Using src/scripts/inference-codegen
55
*/
6-
76
/**
87
* Inputs for Image Classification inference
98
*/
@@ -18,7 +17,6 @@ export interface ImageClassificationInput {
1817
parameters?: ImageClassificationParameters;
1918
[property: string]: unknown;
2019
}
21-
2220
/**
2321
* Additional inference parameters
2422
*
@@ -35,13 +33,12 @@ export interface ImageClassificationParameters {
3533
topK?: number;
3634
[property: string]: unknown;
3735
}
38-
3936
export type ImageClassificationOutputTransform = "sigmoid" | "softmax" | "none";
40-
37+
export type ImageClassificationOutput = ImageClassificationOutputElement[];
4138
/**
4239
* Outputs of inference for the Image Classification task
4340
*/
44-
export interface ImageClassificationOutput {
41+
export interface ImageClassificationOutputElement {
4542
/**
4643
* The predicted class label (model specific).
4744
*/

packages/tasks/src/tasks/image-segmentation/inference.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
*
44
* Using src/scripts/inference-codegen
55
*/
6-
76
/**
87
* Inputs for Image Segmentation inference
98
*/
@@ -18,7 +17,6 @@ export interface ImageSegmentationInput {
1817
parameters?: ImageSegmentationParameters;
1918
[property: string]: unknown;
2019
}
21-
2220
/**
2321
* Additional inference parameters
2422
*
@@ -43,15 +41,14 @@ export interface ImageSegmentationParameters {
4341
threshold?: number;
4442
[property: string]: unknown;
4543
}
46-
4744
export type ImageSegmentationSubtask = "instance" | "panoptic" | "semantic";
48-
45+
export type ImageSegmentationOutput = ImageSegmentationOutputElement[];
4946
/**
5047
* Outputs of inference for the Image Segmentation task
5148
*
5249
* A predicted mask / segment
5350
*/
54-
export interface ImageSegmentationOutput {
51+
export interface ImageSegmentationOutputElement {
5552
/**
5653
* The label of the predicted segment
5754
*/

packages/tasks/src/tasks/image-to-text/inference.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
*
44
* Using src/scripts/inference-codegen
55
*/
6-
76
/**
87
* Inputs for Image To Text inference
98
*/
@@ -18,7 +17,6 @@ export interface ImageToTextInput {
1817
parameters?: ImageToTextParameters;
1918
[property: string]: unknown;
2019
}
21-
2220
/**
2321
* Additional inference parameters
2422
*
@@ -31,11 +29,11 @@ export interface ImageToTextParameters {
3129
maxNewTokens?: number;
3230
[property: string]: unknown;
3331
}
34-
32+
export type ImageToTextOutput = ImageToTextOutputElement[];
3533
/**
3634
* Outputs of inference for the Image To Text task
3735
*/
38-
export interface ImageToTextOutput {
36+
export interface ImageToTextOutputElement {
3937
/**
4038
* The generated text.
4139
*/

packages/tasks/src/tasks/object-detection/inference.ts

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
*
44
* Using src/scripts/inference-codegen
55
*/
6-
76
/**
87
* Inputs for Object Detection inference
98
*/
@@ -18,7 +17,6 @@ export interface ObjectDetectionInput {
1817
parameters?: ObjectDetectionParameters;
1918
[property: string]: unknown;
2019
}
21-
2220
/**
2321
* Additional inference parameters
2422
*
@@ -31,11 +29,22 @@ export interface ObjectDetectionParameters {
3129
threshold?: number;
3230
[property: string]: unknown;
3331
}
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[];
3544
/**
3645
* Outputs of inference for the Object Detection task
3746
*/
38-
export interface ObjectDetectionOutput {
47+
export interface ObjectDetectionOutputElement {
3948
/**
4049
* The predicted bounding box. Coordinates are relative to the top left corner of the input
4150
* image.
@@ -51,15 +60,3 @@ export interface ObjectDetectionOutput {
5160
score: number;
5261
[property: string]: unknown;
5362
}
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-
}

packages/tasks/src/tasks/question-answering/inference.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
*
44
* Using src/scripts/inference-codegen
55
*/
6-
76
/**
87
* Inputs for Question Answering inference
98
*/
@@ -18,7 +17,6 @@ export interface QuestionAnsweringInput {
1817
parameters?: QuestionAnsweringParameters;
1918
[property: string]: unknown;
2019
}
21-
2220
/**
2321
* One (context, question) pair to answer
2422
*/
@@ -33,7 +31,6 @@ export interface QuestionAnsweringInputData {
3331
question: string;
3432
[property: string]: unknown;
3533
}
36-
3734
/**
3835
* Additional inference parameters
3936
*
@@ -77,11 +74,11 @@ export interface QuestionAnsweringParameters {
7774
topK?: number;
7875
[property: string]: unknown;
7976
}
80-
77+
export type QuestionAnsweringOutput = QuestionAnsweringOutputElement[];
8178
/**
8279
* Outputs of inference for the Question Answering task
8380
*/
84-
export interface QuestionAnsweringOutput {
81+
export interface QuestionAnsweringOutputElement {
8582
/**
8683
* The answer to the question.
8784
*/

packages/tasks/src/tasks/table-question-answering/inference.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
*
44
* Using src/scripts/inference-codegen
55
*/
6-
76
/**
87
* Inputs for Table Question Answering inference
98
*/
@@ -15,10 +14,11 @@ export interface TableQuestionAnsweringInput {
1514
/**
1615
* Additional inference parameters
1716
*/
18-
parameters?: { [key: string]: unknown };
17+
parameters?: {
18+
[key: string]: unknown;
19+
};
1920
[property: string]: unknown;
2021
}
21-
2222
/**
2323
* One (table, question) pair to answer
2424
*/
@@ -30,14 +30,16 @@ export interface TableQuestionAnsweringInputData {
3030
/**
3131
* The table to serve as context for the questions
3232
*/
33-
table: { [key: string]: unknown };
33+
table: {
34+
[key: string]: unknown;
35+
};
3436
[property: string]: unknown;
3537
}
36-
38+
export type TableQuestionAnsweringOutput = TableQuestionAnsweringOutputElement[];
3739
/**
3840
* Outputs of inference for the Table Question Answering task
3941
*/
40-
export interface TableQuestionAnsweringOutput {
42+
export interface TableQuestionAnsweringOutputElement {
4143
/**
4244
* If the model has an aggregator, this returns the aggregator.
4345
*/

packages/tasks/src/tasks/text-classification/inference.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
*
44
* Using src/scripts/inference-codegen
55
*/
6-
76
/**
87
* Inputs for Text Classification inference
98
*/
@@ -18,7 +17,6 @@ export interface TextClassificationInput {
1817
parameters?: TextClassificationParameters;
1918
[property: string]: unknown;
2019
}
21-
2220
/**
2321
* Additional inference parameters
2422
*
@@ -35,13 +33,12 @@ export interface TextClassificationParameters {
3533
topK?: number;
3634
[property: string]: unknown;
3735
}
38-
3936
export type TextClassificationOutputTransform = "sigmoid" | "softmax" | "none";
40-
37+
export type TextClassificationOutput = TextClassificationOutputElement[];
4138
/**
4239
* Outputs of inference for the Text Classification task
4340
*/
44-
export interface TextClassificationOutput {
41+
export interface TextClassificationOutputElement {
4542
/**
4643
* The predicted class label (model specific).
4744
*/

0 commit comments

Comments
 (0)