@huggingface/tasks 0.13.17 → 0.14.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/commonjs/model-libraries-snippets.d.ts +2 -2
- package/dist/commonjs/model-libraries-snippets.d.ts.map +1 -1
- package/dist/commonjs/model-libraries-snippets.js +2 -2
- package/dist/commonjs/model-libraries.d.ts +2 -2
- package/dist/commonjs/tasks/audio-classification/inference.d.ts +1 -1
- package/dist/commonjs/tasks/audio-classification/inference.d.ts.map +1 -1
- package/dist/commonjs/tasks/automatic-speech-recognition/inference.d.ts +1 -1
- package/dist/commonjs/tasks/automatic-speech-recognition/inference.d.ts.map +1 -1
- package/dist/commonjs/tasks/automatic-speech-recognition/inference.js +0 -5
- package/dist/commonjs/tasks/chat-completion/inference.d.ts.map +1 -1
- package/dist/commonjs/tasks/chat-completion/inference.js +0 -5
- package/dist/commonjs/tasks/depth-estimation/inference.d.ts.map +1 -1
- package/dist/commonjs/tasks/depth-estimation/inference.js +0 -5
- package/dist/commonjs/tasks/feature-extraction/inference.d.ts.map +1 -1
- package/dist/commonjs/tasks/feature-extraction/inference.js +0 -5
- package/dist/commonjs/tasks/image-classification/inference.d.ts +1 -1
- package/dist/commonjs/tasks/image-classification/inference.d.ts.map +1 -1
- package/dist/commonjs/tasks/image-segmentation/inference.d.ts +1 -1
- package/dist/commonjs/tasks/image-segmentation/inference.d.ts.map +1 -1
- package/dist/commonjs/tasks/image-to-image/inference.d.ts +3 -3
- package/dist/commonjs/tasks/image-to-image/inference.d.ts.map +1 -1
- package/dist/commonjs/tasks/image-to-image/inference.js +0 -5
- package/dist/commonjs/tasks/image-to-text/inference.d.ts +1 -1
- package/dist/commonjs/tasks/image-to-text/inference.d.ts.map +1 -1
- package/dist/commonjs/tasks/image-to-text/inference.js +0 -5
- package/dist/commonjs/tasks/index.d.ts +1 -0
- package/dist/commonjs/tasks/index.d.ts.map +1 -1
- package/dist/commonjs/tasks/object-detection/inference.d.ts +1 -1
- package/dist/commonjs/tasks/object-detection/inference.d.ts.map +1 -1
- package/dist/commonjs/tasks/sentence-similarity/inference.d.ts.map +1 -1
- package/dist/commonjs/tasks/sentence-similarity/inference.js +0 -5
- package/dist/commonjs/tasks/summarization/inference.d.ts.map +1 -1
- package/dist/commonjs/tasks/summarization/inference.js +0 -5
- package/dist/commonjs/tasks/text-generation/inference.d.ts.map +1 -1
- package/dist/commonjs/tasks/text-generation/inference.js +0 -5
- package/dist/commonjs/tasks/text-to-audio/inference.d.ts +14 -15
- package/dist/commonjs/tasks/text-to-audio/inference.d.ts.map +1 -1
- package/dist/commonjs/tasks/text-to-audio/inference.js +0 -5
- package/dist/commonjs/tasks/text-to-image/inference.d.ts +2 -2
- package/dist/commonjs/tasks/text-to-image/inference.d.ts.map +1 -1
- package/dist/commonjs/tasks/text-to-image/inference.js +0 -5
- package/dist/commonjs/tasks/text-to-speech/inference.d.ts +14 -17
- package/dist/commonjs/tasks/text-to-speech/inference.d.ts.map +1 -1
- package/dist/commonjs/tasks/text-to-speech/inference.js +0 -5
- package/dist/commonjs/tasks/text-to-video/inference.d.ts +58 -0
- package/dist/commonjs/tasks/text-to-video/inference.d.ts.map +1 -0
- package/dist/commonjs/tasks/text-to-video/inference.js +2 -0
- package/dist/commonjs/tasks/text2text-generation/inference.d.ts.map +1 -1
- package/dist/commonjs/tasks/text2text-generation/inference.js +0 -5
- package/dist/commonjs/tasks/translation/inference.d.ts.map +1 -1
- package/dist/commonjs/tasks/translation/inference.js +0 -5
- package/dist/commonjs/tasks/visual-question-answering/inference.d.ts +1 -1
- package/dist/commonjs/tasks/visual-question-answering/inference.d.ts.map +1 -1
- package/dist/commonjs/tasks/zero-shot-image-classification/inference.d.ts +1 -1
- package/dist/commonjs/tasks/zero-shot-image-classification/inference.d.ts.map +1 -1
- package/dist/commonjs/tasks/zero-shot-object-detection/inference.d.ts +1 -1
- package/dist/commonjs/tasks/zero-shot-object-detection/inference.d.ts.map +1 -1
- package/dist/esm/model-libraries-snippets.d.ts +2 -2
- package/dist/esm/model-libraries-snippets.d.ts.map +1 -1
- package/dist/esm/model-libraries-snippets.js +2 -2
- package/dist/esm/model-libraries.d.ts +2 -2
- package/dist/esm/tasks/audio-classification/inference.d.ts +1 -1
- package/dist/esm/tasks/audio-classification/inference.d.ts.map +1 -1
- package/dist/esm/tasks/automatic-speech-recognition/inference.d.ts +1 -1
- package/dist/esm/tasks/automatic-speech-recognition/inference.d.ts.map +1 -1
- package/dist/esm/tasks/automatic-speech-recognition/inference.js +0 -5
- package/dist/esm/tasks/chat-completion/inference.d.ts.map +1 -1
- package/dist/esm/tasks/chat-completion/inference.js +0 -5
- package/dist/esm/tasks/depth-estimation/inference.d.ts.map +1 -1
- package/dist/esm/tasks/depth-estimation/inference.js +0 -5
- package/dist/esm/tasks/feature-extraction/inference.d.ts.map +1 -1
- package/dist/esm/tasks/feature-extraction/inference.js +0 -5
- package/dist/esm/tasks/image-classification/inference.d.ts +1 -1
- package/dist/esm/tasks/image-classification/inference.d.ts.map +1 -1
- package/dist/esm/tasks/image-segmentation/inference.d.ts +1 -1
- package/dist/esm/tasks/image-segmentation/inference.d.ts.map +1 -1
- package/dist/esm/tasks/image-to-image/inference.d.ts +3 -3
- package/dist/esm/tasks/image-to-image/inference.d.ts.map +1 -1
- package/dist/esm/tasks/image-to-image/inference.js +0 -5
- package/dist/esm/tasks/image-to-text/inference.d.ts +1 -1
- package/dist/esm/tasks/image-to-text/inference.d.ts.map +1 -1
- package/dist/esm/tasks/image-to-text/inference.js +0 -5
- package/dist/esm/tasks/index.d.ts +1 -0
- package/dist/esm/tasks/index.d.ts.map +1 -1
- package/dist/esm/tasks/object-detection/inference.d.ts +1 -1
- package/dist/esm/tasks/object-detection/inference.d.ts.map +1 -1
- package/dist/esm/tasks/sentence-similarity/inference.d.ts.map +1 -1
- package/dist/esm/tasks/sentence-similarity/inference.js +0 -5
- package/dist/esm/tasks/summarization/inference.d.ts.map +1 -1
- package/dist/esm/tasks/summarization/inference.js +0 -5
- package/dist/esm/tasks/text-generation/inference.d.ts.map +1 -1
- package/dist/esm/tasks/text-generation/inference.js +0 -5
- package/dist/esm/tasks/text-to-audio/inference.d.ts +14 -15
- package/dist/esm/tasks/text-to-audio/inference.d.ts.map +1 -1
- package/dist/esm/tasks/text-to-audio/inference.js +0 -5
- package/dist/esm/tasks/text-to-image/inference.d.ts +2 -2
- package/dist/esm/tasks/text-to-image/inference.d.ts.map +1 -1
- package/dist/esm/tasks/text-to-image/inference.js +0 -5
- package/dist/esm/tasks/text-to-speech/inference.d.ts +14 -17
- package/dist/esm/tasks/text-to-speech/inference.d.ts.map +1 -1
- package/dist/esm/tasks/text-to-speech/inference.js +0 -5
- package/dist/esm/tasks/text-to-video/inference.d.ts +58 -0
- package/dist/esm/tasks/text-to-video/inference.d.ts.map +1 -0
- package/dist/esm/tasks/text-to-video/inference.js +1 -0
- package/dist/esm/tasks/text2text-generation/inference.d.ts.map +1 -1
- package/dist/esm/tasks/text2text-generation/inference.js +0 -5
- package/dist/esm/tasks/translation/inference.d.ts.map +1 -1
- package/dist/esm/tasks/translation/inference.js +0 -5
- package/dist/esm/tasks/visual-question-answering/inference.d.ts +1 -1
- package/dist/esm/tasks/visual-question-answering/inference.d.ts.map +1 -1
- package/dist/esm/tasks/zero-shot-image-classification/inference.d.ts +1 -1
- package/dist/esm/tasks/zero-shot-image-classification/inference.d.ts.map +1 -1
- package/dist/esm/tasks/zero-shot-object-detection/inference.d.ts +1 -1
- package/dist/esm/tasks/zero-shot-object-detection/inference.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/model-libraries-snippets.ts +3 -3
- package/src/tasks/audio-classification/inference.ts +1 -1
- package/src/tasks/audio-classification/spec/input.json +2 -1
- package/src/tasks/automatic-speech-recognition/inference.ts +1 -7
- package/src/tasks/automatic-speech-recognition/spec/input.json +2 -1
- package/src/tasks/chat-completion/inference.ts +0 -33
- package/src/tasks/depth-estimation/inference.ts +3 -3
- package/src/tasks/document-question-answering/spec/input.json +2 -1
- package/src/tasks/feature-extraction/inference.ts +0 -3
- package/src/tasks/image-classification/inference.ts +1 -1
- package/src/tasks/image-classification/spec/input.json +2 -1
- package/src/tasks/image-segmentation/inference.ts +1 -1
- package/src/tasks/image-segmentation/spec/input.json +2 -1
- package/src/tasks/image-to-image/inference.ts +3 -7
- package/src/tasks/image-to-image/spec/input.json +4 -6
- package/src/tasks/image-to-text/inference.ts +1 -6
- package/src/tasks/image-to-text/spec/input.json +2 -1
- package/src/tasks/index.ts +1 -0
- package/src/tasks/object-detection/inference.ts +1 -1
- package/src/tasks/object-detection/spec/input.json +2 -1
- package/src/tasks/sentence-similarity/inference.ts +3 -4
- package/src/tasks/summarization/inference.ts +3 -5
- package/src/tasks/text-generation/inference.ts +0 -13
- package/src/tasks/text-to-audio/inference.ts +14 -20
- package/src/tasks/text-to-audio/spec/output.json +3 -2
- package/src/tasks/text-to-image/inference.ts +2 -6
- package/src/tasks/text-to-image/spec/input.json +2 -5
- package/src/tasks/text-to-speech/inference.ts +14 -22
- package/src/tasks/text-to-speech/spec/output.json +13 -2
- package/src/tasks/text-to-video/inference.ts +57 -0
- package/src/tasks/text-to-video/spec/input.json +49 -0
- package/src/tasks/text-to-video/spec/output.json +13 -0
- package/src/tasks/text2text-generation/inference.ts +3 -5
- package/src/tasks/translation/inference.ts +3 -5
- package/src/tasks/visual-question-answering/inference.ts +1 -1
- package/src/tasks/visual-question-answering/spec/input.json +4 -2
- package/src/tasks/zero-shot-image-classification/inference.ts +1 -1
- package/src/tasks/zero-shot-image-classification/spec/input.json +2 -1
- package/src/tasks/zero-shot-object-detection/inference.ts +1 -1
- package/src/tasks/zero-shot-object-detection/spec/input.json +2 -1
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Outputs of inference for the Text To Speech task
|
|
3
|
+
*/
|
|
4
|
+
export interface TextToSpeechOutput {
|
|
5
|
+
/**
|
|
6
|
+
* The generated audio
|
|
7
|
+
*/
|
|
8
|
+
audio: Blob;
|
|
9
|
+
/**
|
|
10
|
+
* The sampling rate of the generated audio waveform.
|
|
11
|
+
*/
|
|
12
|
+
sampling_rate?: number;
|
|
13
|
+
[property: string]: unknown;
|
|
14
|
+
}
|
|
1
15
|
/**
|
|
2
16
|
* Inference code generated from the JSON schema spec in ./spec
|
|
3
17
|
*
|
|
@@ -117,21 +131,4 @@ export interface GenerationParameters {
|
|
|
117
131
|
* Controls the stopping condition for beam-based methods.
|
|
118
132
|
*/
|
|
119
133
|
export type EarlyStoppingUnion = boolean | "never";
|
|
120
|
-
/**
|
|
121
|
-
* Outputs for Text to Speech inference
|
|
122
|
-
*
|
|
123
|
-
* Outputs of inference for the Text To Audio task
|
|
124
|
-
*/
|
|
125
|
-
export interface TextToSpeechOutput {
|
|
126
|
-
/**
|
|
127
|
-
* The generated audio waveform.
|
|
128
|
-
*/
|
|
129
|
-
audio: unknown;
|
|
130
|
-
samplingRate: unknown;
|
|
131
|
-
/**
|
|
132
|
-
* The sampling rate of the generated audio waveform.
|
|
133
|
-
*/
|
|
134
|
-
sampling_rate?: number;
|
|
135
|
-
[property: string]: unknown;
|
|
136
|
-
}
|
|
137
134
|
//# sourceMappingURL=inference.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inference.d.ts","sourceRoot":"","sources":["../../../../src/tasks/text-to-speech/inference.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"inference.d.ts","sourceRoot":"","sources":["../../../../src/tasks/text-to-speech/inference.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAClC;;OAEG;IACH,KAAK,EAAE,IAAI,CAAC;IACZ;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B;AACD;;;;GAIG;AACH;;GAEG;AACH,MAAM,WAAW,iBAAiB;IACjC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,UAAU,CAAC,EAAE,sBAAsB,CAAC;IACpC,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B;AACD;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACtC;;OAEG;IACH,qBAAqB,CAAC,EAAE,oBAAoB,CAAC;IAC7C,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B;AACD;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACpC;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,cAAc,CAAC,EAAE,kBAAkB,CAAC;IACpC;;;;;OAKG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;;;;;;OAQG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B;AACD;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,OAAO,GAAG,OAAO,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Inference code generated from the JSON schema spec in ./spec
|
|
3
|
+
*
|
|
4
|
+
* Using src/scripts/inference-codegen
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Inputs for Text To Video inference
|
|
8
|
+
*/
|
|
9
|
+
export interface TextToVideoInput {
|
|
10
|
+
/**
|
|
11
|
+
* The input text data (sometimes called "prompt")
|
|
12
|
+
*/
|
|
13
|
+
inputs: string;
|
|
14
|
+
/**
|
|
15
|
+
* Additional inference parameters for Text To Video
|
|
16
|
+
*/
|
|
17
|
+
parameters?: TextToVideoParameters;
|
|
18
|
+
[property: string]: unknown;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Additional inference parameters for Text To Video
|
|
22
|
+
*/
|
|
23
|
+
export interface TextToVideoParameters {
|
|
24
|
+
/**
|
|
25
|
+
* A higher guidance scale value encourages the model to generate images closely linked to
|
|
26
|
+
* the text prompt, but values too high may cause saturation and other artifacts.
|
|
27
|
+
*/
|
|
28
|
+
guidance_scale?: number;
|
|
29
|
+
/**
|
|
30
|
+
* One or several prompt to guide what NOT to include in image generation.
|
|
31
|
+
*/
|
|
32
|
+
negative_prompt?: string[];
|
|
33
|
+
/**
|
|
34
|
+
* The num_frames parameter determines how many video frames are generated.
|
|
35
|
+
*/
|
|
36
|
+
num_frames?: number;
|
|
37
|
+
/**
|
|
38
|
+
* The number of denoising steps. More denoising steps usually lead to a higher quality
|
|
39
|
+
* image at the expense of slower inference.
|
|
40
|
+
*/
|
|
41
|
+
num_inference_steps?: number;
|
|
42
|
+
/**
|
|
43
|
+
* Seed for the random number generator.
|
|
44
|
+
*/
|
|
45
|
+
seed?: number;
|
|
46
|
+
[property: string]: unknown;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Outputs of inference for the Text To Video task
|
|
50
|
+
*/
|
|
51
|
+
export interface TextToVideoOutput {
|
|
52
|
+
/**
|
|
53
|
+
* The generated video returned as raw bytes in the payload.
|
|
54
|
+
*/
|
|
55
|
+
video: unknown;
|
|
56
|
+
[property: string]: unknown;
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=inference.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inference.d.ts","sourceRoot":"","sources":["../../../../src/tasks/text-to-video/inference.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAChC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,UAAU,CAAC,EAAE,qBAAqB,CAAC;IACnC,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B;AACD;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACrC;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B;AACD;;GAEG;AACH,MAAM,WAAW,iBAAiB;IACjC;;OAEG;IACH,KAAK,EAAE,OAAO,CAAC;IACf,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inference.d.ts","sourceRoot":"","sources":["../../../../src/tasks/text2text-generation/inference.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"inference.d.ts","sourceRoot":"","sources":["../../../../src/tasks/text2text-generation/inference.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACxC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,UAAU,CAAC,EAAE,6BAA6B,CAAC;IAC3C,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B;AACD;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC7C;;OAEG;IACH,4BAA4B,CAAC,EAAE,OAAO,CAAC;IACvC;;OAEG;IACH,mBAAmB,CAAC,EAAE;QACrB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;KACvB,CAAC;IACF;;OAEG;IACH,UAAU,CAAC,EAAE,qCAAqC,CAAC;IACnD,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B;AACD,MAAM,MAAM,qCAAqC,GAAG,iBAAiB,GAAG,eAAe,GAAG,YAAY,GAAG,aAAa,CAAC;AACvH;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACzC,aAAa,EAAE,OAAO,CAAC;IACvB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inference.d.ts","sourceRoot":"","sources":["../../../../src/tasks/translation/inference.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"inference.d.ts","sourceRoot":"","sources":["../../../../src/tasks/translation/inference.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAChC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,UAAU,CAAC,EAAE,qBAAqB,CAAC;IACnC,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B;AACD;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACrC;;OAEG;IACH,4BAA4B,CAAC,EAAE,OAAO,CAAC;IACvC;;OAEG;IACH,mBAAmB,CAAC,EAAE;QACrB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;KACvB,CAAC;IACF;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,UAAU,CAAC,EAAE,6BAA6B,CAAC;IAC3C,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B;AACD;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG,iBAAiB,GAAG,eAAe,GAAG,YAAY,GAAG,aAAa,CAAC;AAC/G;;GAEG;AACH,MAAM,WAAW,iBAAiB;IACjC;;OAEG;IACH,gBAAgB,EAAE,MAAM,CAAC;IACzB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inference.d.ts","sourceRoot":"","sources":["../../../../src/tasks/visual-question-answering/inference.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC5C;;OAEG;IACH,MAAM,EAAE,gCAAgC,CAAC;IACzC;;OAEG;IACH,UAAU,CAAC,EAAE,iCAAiC,CAAC;IAC/C,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B;AACD;;GAEG;AACH,MAAM,WAAW,gCAAgC;IAChD;;OAEG;IACH,KAAK,EAAE,OAAO,CAAC;IACf;;OAEG;IACH,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"inference.d.ts","sourceRoot":"","sources":["../../../../src/tasks/visual-question-answering/inference.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC5C;;OAEG;IACH,MAAM,EAAE,gCAAgC,CAAC;IACzC;;OAEG;IACH,UAAU,CAAC,EAAE,iCAAiC,CAAC;IAC/C,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B;AACD;;GAEG;AACH,MAAM,WAAW,gCAAgC;IAChD;;OAEG;IACH,KAAK,EAAE,OAAO,CAAC;IACf;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B;AACD;;GAEG;AACH,MAAM,WAAW,iCAAiC;IACjD;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B;AACD,MAAM,MAAM,6BAA6B,GAAG,oCAAoC,EAAE,CAAC;AACnF;;GAEG;AACH,MAAM,WAAW,oCAAoC;IACpD;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inference.d.ts","sourceRoot":"","sources":["../../../../src/tasks/zero-shot-image-classification/inference.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH;;GAEG;AACH,MAAM,WAAW,gCAAgC;IAChD;;OAEG;IACH,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"inference.d.ts","sourceRoot":"","sources":["../../../../src/tasks/zero-shot-image-classification/inference.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH;;GAEG;AACH,MAAM,WAAW,gCAAgC;IAChD;;OAEG;IACH,MAAM,EAAE,IAAI,CAAC;IACb;;OAEG;IACH,UAAU,EAAE,qCAAqC,CAAC;IAClD,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B;AACD;;GAEG;AACH,MAAM,WAAW,qCAAqC;IACrD;;OAEG;IACH,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B;;;OAGG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B;AACD,MAAM,MAAM,iCAAiC,GAAG,wCAAwC,EAAE,CAAC;AAC3F;;GAEG;AACH,MAAM,WAAW,wCAAwC;IACxD;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inference.d.ts","sourceRoot":"","sources":["../../../../src/tasks/zero-shot-object-detection/inference.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC5C;;OAEG;IACH,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"inference.d.ts","sourceRoot":"","sources":["../../../../src/tasks/zero-shot-object-detection/inference.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC5C;;OAEG;IACH,MAAM,EAAE,IAAI,CAAC;IACb;;OAEG;IACH,UAAU,EAAE,iCAAiC,CAAC;IAC9C,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B;AACD;;GAEG;AACH,MAAM,WAAW,iCAAiC;IACjD;;OAEG;IACH,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B;AACD;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B;AACD,MAAM,MAAM,6BAA6B,GAAG,oCAAoC,EAAE,CAAC;AACnF;;GAEG;AACH,MAAM,WAAW,oCAAoC;IACpD;;;OAGG;IACH,GAAG,EAAE,WAAW,CAAC;IACjB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@huggingface/tasks",
|
|
3
3
|
"packageManager": "pnpm@8.10.5",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.14.0",
|
|
5
5
|
"description": "List of ML tasks for huggingface.co/tasks",
|
|
6
6
|
"repository": "https://github.com/huggingface/huggingface.js.git",
|
|
7
7
|
"publishConfig": {
|
|
@@ -95,7 +95,7 @@ export const bm25s = (model: ModelData): string[] => [
|
|
|
95
95
|
retriever = BM25HF.load_from_hub("${model.id}")`,
|
|
96
96
|
];
|
|
97
97
|
|
|
98
|
-
export const cxr_foundation = (
|
|
98
|
+
export const cxr_foundation = (): string[] => [
|
|
99
99
|
`!git clone https://github.com/Google-Health/cxr-foundation.git
|
|
100
100
|
import tensorflow as tf, sys, requests
|
|
101
101
|
sys.path.append('cxr-foundation/python/')
|
|
@@ -191,7 +191,7 @@ focallength_px = prediction["focallength_px"]`;
|
|
|
191
191
|
return [installSnippet, inferenceSnippet];
|
|
192
192
|
};
|
|
193
193
|
|
|
194
|
-
export const derm_foundation = (
|
|
194
|
+
export const derm_foundation = (): string[] => [
|
|
195
195
|
`from huggingface_hub import from_pretrained_keras
|
|
196
196
|
import tensorflow as tf, requests
|
|
197
197
|
|
|
@@ -211,7 +211,7 @@ input_tensor = tf.train.Example(
|
|
|
211
211
|
loaded_model = from_pretrained_keras("google/derm-foundation")
|
|
212
212
|
infer = loaded_model.signatures["serving_default"]
|
|
213
213
|
print(infer(inputs=tf.constant([input_tensor])))`,
|
|
214
|
-
]
|
|
214
|
+
];
|
|
215
215
|
|
|
216
216
|
const diffusersDefaultPrompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k";
|
|
217
217
|
|
|
@@ -11,7 +11,7 @@ export interface AudioClassificationInput {
|
|
|
11
11
|
* The input audio data as a base64-encoded string. If no `parameters` are provided, you can
|
|
12
12
|
* also provide the audio data as a raw bytes payload.
|
|
13
13
|
*/
|
|
14
|
-
inputs:
|
|
14
|
+
inputs: Blob;
|
|
15
15
|
/**
|
|
16
16
|
* Additional inference parameters for Audio Classification
|
|
17
17
|
*/
|
|
@@ -7,7 +7,8 @@
|
|
|
7
7
|
"properties": {
|
|
8
8
|
"inputs": {
|
|
9
9
|
"description": "The input audio data as a base64-encoded string. If no `parameters` are provided, you can also provide the audio data as a raw bytes payload.",
|
|
10
|
-
"type": "string"
|
|
10
|
+
"type": "string",
|
|
11
|
+
"comment": "type=binary"
|
|
11
12
|
},
|
|
12
13
|
"parameters": {
|
|
13
14
|
"description": "Additional inference parameters for Audio Classification",
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Using src/scripts/inference-codegen
|
|
5
5
|
*/
|
|
6
|
-
|
|
7
6
|
/**
|
|
8
7
|
* Inputs for Automatic Speech Recognition inference
|
|
9
8
|
*/
|
|
@@ -12,14 +11,13 @@ export interface AutomaticSpeechRecognitionInput {
|
|
|
12
11
|
* The input audio data as a base64-encoded string. If no `parameters` are provided, you can
|
|
13
12
|
* also provide the audio data as a raw bytes payload.
|
|
14
13
|
*/
|
|
15
|
-
inputs:
|
|
14
|
+
inputs: Blob;
|
|
16
15
|
/**
|
|
17
16
|
* Additional inference parameters for Automatic Speech Recognition
|
|
18
17
|
*/
|
|
19
18
|
parameters?: AutomaticSpeechRecognitionParameters;
|
|
20
19
|
[property: string]: unknown;
|
|
21
20
|
}
|
|
22
|
-
|
|
23
21
|
/**
|
|
24
22
|
* Additional inference parameters for Automatic Speech Recognition
|
|
25
23
|
*/
|
|
@@ -34,7 +32,6 @@ export interface AutomaticSpeechRecognitionParameters {
|
|
|
34
32
|
return_timestamps?: boolean;
|
|
35
33
|
[property: string]: unknown;
|
|
36
34
|
}
|
|
37
|
-
|
|
38
35
|
/**
|
|
39
36
|
* Parametrization of the text generation process
|
|
40
37
|
*/
|
|
@@ -121,12 +118,10 @@ export interface GenerationParameters {
|
|
|
121
118
|
use_cache?: boolean;
|
|
122
119
|
[property: string]: unknown;
|
|
123
120
|
}
|
|
124
|
-
|
|
125
121
|
/**
|
|
126
122
|
* Controls the stopping condition for beam-based methods.
|
|
127
123
|
*/
|
|
128
124
|
export type EarlyStoppingUnion = boolean | "never";
|
|
129
|
-
|
|
130
125
|
/**
|
|
131
126
|
* Outputs of inference for the Automatic Speech Recognition task
|
|
132
127
|
*/
|
|
@@ -142,7 +137,6 @@ export interface AutomaticSpeechRecognitionOutput {
|
|
|
142
137
|
text: string;
|
|
143
138
|
[property: string]: unknown;
|
|
144
139
|
}
|
|
145
|
-
|
|
146
140
|
export interface AutomaticSpeechRecognitionOutputChunk {
|
|
147
141
|
/**
|
|
148
142
|
* A chunk of text identified by the model
|
|
@@ -7,7 +7,8 @@
|
|
|
7
7
|
"properties": {
|
|
8
8
|
"inputs": {
|
|
9
9
|
"description": "The input audio data as a base64-encoded string. If no `parameters` are provided, you can also provide the audio data as a raw bytes payload.",
|
|
10
|
-
"type": "string"
|
|
10
|
+
"type": "string",
|
|
11
|
+
"comment": "type=binary"
|
|
11
12
|
},
|
|
12
13
|
"parameters": {
|
|
13
14
|
"description": "Additional inference parameters for Automatic Speech Recognition",
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Using src/scripts/inference-codegen
|
|
5
5
|
*/
|
|
6
|
-
|
|
7
6
|
/**
|
|
8
7
|
* Chat Completion Input.
|
|
9
8
|
*
|
|
@@ -105,30 +104,24 @@ export interface ChatCompletionInput {
|
|
|
105
104
|
top_p?: number;
|
|
106
105
|
[property: string]: unknown;
|
|
107
106
|
}
|
|
108
|
-
|
|
109
107
|
export interface ChatCompletionInputMessage {
|
|
110
108
|
content: ChatCompletionInputMessageContent;
|
|
111
109
|
name?: string;
|
|
112
110
|
role: string;
|
|
113
111
|
[property: string]: unknown;
|
|
114
112
|
}
|
|
115
|
-
|
|
116
113
|
export type ChatCompletionInputMessageContent = ChatCompletionInputMessageChunk[] | string;
|
|
117
|
-
|
|
118
114
|
export interface ChatCompletionInputMessageChunk {
|
|
119
115
|
image_url?: ChatCompletionInputURL;
|
|
120
116
|
text?: string;
|
|
121
117
|
type: ChatCompletionInputMessageChunkType;
|
|
122
118
|
[property: string]: unknown;
|
|
123
119
|
}
|
|
124
|
-
|
|
125
120
|
export interface ChatCompletionInputURL {
|
|
126
121
|
url: string;
|
|
127
122
|
[property: string]: unknown;
|
|
128
123
|
}
|
|
129
|
-
|
|
130
124
|
export type ChatCompletionInputMessageChunkType = "text" | "image_url";
|
|
131
|
-
|
|
132
125
|
export interface ChatCompletionInputGrammarType {
|
|
133
126
|
type: ChatCompletionInputGrammarTypeType;
|
|
134
127
|
/**
|
|
@@ -140,9 +133,7 @@ export interface ChatCompletionInputGrammarType {
|
|
|
140
133
|
value: unknown;
|
|
141
134
|
[property: string]: unknown;
|
|
142
135
|
}
|
|
143
|
-
|
|
144
136
|
export type ChatCompletionInputGrammarTypeType = "json" | "regex";
|
|
145
|
-
|
|
146
137
|
export interface ChatCompletionInputStreamOptions {
|
|
147
138
|
/**
|
|
148
139
|
* If set, an additional chunk will be streamed before the data: [DONE] message. The usage
|
|
@@ -153,13 +144,11 @@ export interface ChatCompletionInputStreamOptions {
|
|
|
153
144
|
include_usage: boolean;
|
|
154
145
|
[property: string]: unknown;
|
|
155
146
|
}
|
|
156
|
-
|
|
157
147
|
/**
|
|
158
148
|
*
|
|
159
149
|
* <https://platform.openai.com/docs/guides/function-calling/configuring-function-calling-behavior-using-the-tool_choice-parameter>
|
|
160
150
|
*/
|
|
161
151
|
export type ChatCompletionInputToolChoice = ChatCompletionInputToolChoiceEnum | ChatCompletionInputToolChoiceObject;
|
|
162
|
-
|
|
163
152
|
/**
|
|
164
153
|
* Means the model can pick between generating a message or calling one or more tools.
|
|
165
154
|
*
|
|
@@ -168,30 +157,25 @@ export type ChatCompletionInputToolChoice = ChatCompletionInputToolChoiceEnum |
|
|
|
168
157
|
* Means the model must call one or more tools.
|
|
169
158
|
*/
|
|
170
159
|
export type ChatCompletionInputToolChoiceEnum = "auto" | "none" | "required";
|
|
171
|
-
|
|
172
160
|
export interface ChatCompletionInputToolChoiceObject {
|
|
173
161
|
function: ChatCompletionInputFunctionName;
|
|
174
162
|
[property: string]: unknown;
|
|
175
163
|
}
|
|
176
|
-
|
|
177
164
|
export interface ChatCompletionInputFunctionName {
|
|
178
165
|
name: string;
|
|
179
166
|
[property: string]: unknown;
|
|
180
167
|
}
|
|
181
|
-
|
|
182
168
|
export interface ChatCompletionInputTool {
|
|
183
169
|
function: ChatCompletionInputFunctionDefinition;
|
|
184
170
|
type: string;
|
|
185
171
|
[property: string]: unknown;
|
|
186
172
|
}
|
|
187
|
-
|
|
188
173
|
export interface ChatCompletionInputFunctionDefinition {
|
|
189
174
|
arguments: unknown;
|
|
190
175
|
description?: string;
|
|
191
176
|
name: string;
|
|
192
177
|
[property: string]: unknown;
|
|
193
178
|
}
|
|
194
|
-
|
|
195
179
|
/**
|
|
196
180
|
* Chat Completion Output.
|
|
197
181
|
*
|
|
@@ -208,7 +192,6 @@ export interface ChatCompletionOutput {
|
|
|
208
192
|
usage: ChatCompletionOutputUsage;
|
|
209
193
|
[property: string]: unknown;
|
|
210
194
|
}
|
|
211
|
-
|
|
212
195
|
export interface ChatCompletionOutputComplete {
|
|
213
196
|
finish_reason: string;
|
|
214
197
|
index: number;
|
|
@@ -216,53 +199,45 @@ export interface ChatCompletionOutputComplete {
|
|
|
216
199
|
message: ChatCompletionOutputMessage;
|
|
217
200
|
[property: string]: unknown;
|
|
218
201
|
}
|
|
219
|
-
|
|
220
202
|
export interface ChatCompletionOutputLogprobs {
|
|
221
203
|
content: ChatCompletionOutputLogprob[];
|
|
222
204
|
[property: string]: unknown;
|
|
223
205
|
}
|
|
224
|
-
|
|
225
206
|
export interface ChatCompletionOutputLogprob {
|
|
226
207
|
logprob: number;
|
|
227
208
|
token: string;
|
|
228
209
|
top_logprobs: ChatCompletionOutputTopLogprob[];
|
|
229
210
|
[property: string]: unknown;
|
|
230
211
|
}
|
|
231
|
-
|
|
232
212
|
export interface ChatCompletionOutputTopLogprob {
|
|
233
213
|
logprob: number;
|
|
234
214
|
token: string;
|
|
235
215
|
[property: string]: unknown;
|
|
236
216
|
}
|
|
237
|
-
|
|
238
217
|
export interface ChatCompletionOutputMessage {
|
|
239
218
|
content?: string;
|
|
240
219
|
role: string;
|
|
241
220
|
tool_calls?: ChatCompletionOutputToolCall[];
|
|
242
221
|
[property: string]: unknown;
|
|
243
222
|
}
|
|
244
|
-
|
|
245
223
|
export interface ChatCompletionOutputToolCall {
|
|
246
224
|
function: ChatCompletionOutputFunctionDefinition;
|
|
247
225
|
id: string;
|
|
248
226
|
type: string;
|
|
249
227
|
[property: string]: unknown;
|
|
250
228
|
}
|
|
251
|
-
|
|
252
229
|
export interface ChatCompletionOutputFunctionDefinition {
|
|
253
230
|
arguments: unknown;
|
|
254
231
|
description?: string;
|
|
255
232
|
name: string;
|
|
256
233
|
[property: string]: unknown;
|
|
257
234
|
}
|
|
258
|
-
|
|
259
235
|
export interface ChatCompletionOutputUsage {
|
|
260
236
|
completion_tokens: number;
|
|
261
237
|
prompt_tokens: number;
|
|
262
238
|
total_tokens: number;
|
|
263
239
|
[property: string]: unknown;
|
|
264
240
|
}
|
|
265
|
-
|
|
266
241
|
/**
|
|
267
242
|
* Chat Completion Stream Output.
|
|
268
243
|
*
|
|
@@ -279,7 +254,6 @@ export interface ChatCompletionStreamOutput {
|
|
|
279
254
|
usage?: ChatCompletionStreamOutputUsage;
|
|
280
255
|
[property: string]: unknown;
|
|
281
256
|
}
|
|
282
|
-
|
|
283
257
|
export interface ChatCompletionStreamOutputChoice {
|
|
284
258
|
delta: ChatCompletionStreamOutputDelta;
|
|
285
259
|
finish_reason?: string;
|
|
@@ -287,14 +261,12 @@ export interface ChatCompletionStreamOutputChoice {
|
|
|
287
261
|
logprobs?: ChatCompletionStreamOutputLogprobs;
|
|
288
262
|
[property: string]: unknown;
|
|
289
263
|
}
|
|
290
|
-
|
|
291
264
|
export interface ChatCompletionStreamOutputDelta {
|
|
292
265
|
content?: string;
|
|
293
266
|
role: string;
|
|
294
267
|
tool_calls?: ChatCompletionStreamOutputDeltaToolCall;
|
|
295
268
|
[property: string]: unknown;
|
|
296
269
|
}
|
|
297
|
-
|
|
298
270
|
export interface ChatCompletionStreamOutputDeltaToolCall {
|
|
299
271
|
function: ChatCompletionStreamOutputFunction;
|
|
300
272
|
id: string;
|
|
@@ -302,31 +274,26 @@ export interface ChatCompletionStreamOutputDeltaToolCall {
|
|
|
302
274
|
type: string;
|
|
303
275
|
[property: string]: unknown;
|
|
304
276
|
}
|
|
305
|
-
|
|
306
277
|
export interface ChatCompletionStreamOutputFunction {
|
|
307
278
|
arguments: string;
|
|
308
279
|
name?: string;
|
|
309
280
|
[property: string]: unknown;
|
|
310
281
|
}
|
|
311
|
-
|
|
312
282
|
export interface ChatCompletionStreamOutputLogprobs {
|
|
313
283
|
content: ChatCompletionStreamOutputLogprob[];
|
|
314
284
|
[property: string]: unknown;
|
|
315
285
|
}
|
|
316
|
-
|
|
317
286
|
export interface ChatCompletionStreamOutputLogprob {
|
|
318
287
|
logprob: number;
|
|
319
288
|
token: string;
|
|
320
289
|
top_logprobs: ChatCompletionStreamOutputTopLogprob[];
|
|
321
290
|
[property: string]: unknown;
|
|
322
291
|
}
|
|
323
|
-
|
|
324
292
|
export interface ChatCompletionStreamOutputTopLogprob {
|
|
325
293
|
logprob: number;
|
|
326
294
|
token: string;
|
|
327
295
|
[property: string]: unknown;
|
|
328
296
|
}
|
|
329
|
-
|
|
330
297
|
export interface ChatCompletionStreamOutputUsage {
|
|
331
298
|
completion_tokens: number;
|
|
332
299
|
prompt_tokens: number;
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Using src/scripts/inference-codegen
|
|
5
5
|
*/
|
|
6
|
-
|
|
7
6
|
/**
|
|
8
7
|
* Inputs for Depth Estimation inference
|
|
9
8
|
*/
|
|
@@ -15,10 +14,11 @@ export interface DepthEstimationInput {
|
|
|
15
14
|
/**
|
|
16
15
|
* Additional inference parameters for Depth Estimation
|
|
17
16
|
*/
|
|
18
|
-
parameters?: {
|
|
17
|
+
parameters?: {
|
|
18
|
+
[key: string]: unknown;
|
|
19
|
+
};
|
|
19
20
|
[property: string]: unknown;
|
|
20
21
|
}
|
|
21
|
-
|
|
22
22
|
/**
|
|
23
23
|
* Outputs of inference for the Depth Estimation task
|
|
24
24
|
*/
|
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
"title": "DocumentQuestionAnsweringInputData",
|
|
12
12
|
"properties": {
|
|
13
13
|
"image": {
|
|
14
|
-
"description": "The image on which the question is asked"
|
|
14
|
+
"description": "The image on which the question is asked",
|
|
15
|
+
"comment": "type=binary"
|
|
15
16
|
},
|
|
16
17
|
"question": {
|
|
17
18
|
"type": "string",
|
|
@@ -3,9 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Using src/scripts/inference-codegen
|
|
5
5
|
*/
|
|
6
|
-
|
|
7
6
|
export type FeatureExtractionOutput = Array<number[]>;
|
|
8
|
-
|
|
9
7
|
/**
|
|
10
8
|
* Feature Extraction Input.
|
|
11
9
|
*
|
|
@@ -36,5 +34,4 @@ export interface FeatureExtractionInput {
|
|
|
36
34
|
truncation_direction?: FeatureExtractionInputTruncationDirection;
|
|
37
35
|
[property: string]: unknown;
|
|
38
36
|
}
|
|
39
|
-
|
|
40
37
|
export type FeatureExtractionInputTruncationDirection = "Left" | "Right";
|
|
@@ -11,7 +11,7 @@ export interface ImageClassificationInput {
|
|
|
11
11
|
* The input image data as a base64-encoded string. If no `parameters` are provided, you can
|
|
12
12
|
* also provide the image data as a raw bytes payload.
|
|
13
13
|
*/
|
|
14
|
-
inputs:
|
|
14
|
+
inputs: Blob;
|
|
15
15
|
/**
|
|
16
16
|
* Additional inference parameters for Image Classification
|
|
17
17
|
*/
|
|
@@ -7,7 +7,8 @@
|
|
|
7
7
|
"properties": {
|
|
8
8
|
"inputs": {
|
|
9
9
|
"type": "string",
|
|
10
|
-
"description": "The input image data as a base64-encoded string. If no `parameters` are provided, you can also provide the image data as a raw bytes payload."
|
|
10
|
+
"description": "The input image data as a base64-encoded string. If no `parameters` are provided, you can also provide the image data as a raw bytes payload.",
|
|
11
|
+
"comment": "type=binary"
|
|
11
12
|
},
|
|
12
13
|
"parameters": {
|
|
13
14
|
"description": "Additional inference parameters for Image Classification",
|
|
@@ -11,7 +11,7 @@ export interface ImageSegmentationInput {
|
|
|
11
11
|
* The input image data as a base64-encoded string. If no `parameters` are provided, you can
|
|
12
12
|
* also provide the image data as a raw bytes payload.
|
|
13
13
|
*/
|
|
14
|
-
inputs:
|
|
14
|
+
inputs: Blob;
|
|
15
15
|
/**
|
|
16
16
|
* Additional inference parameters for Image Segmentation
|
|
17
17
|
*/
|
|
@@ -7,7 +7,8 @@
|
|
|
7
7
|
"properties": {
|
|
8
8
|
"inputs": {
|
|
9
9
|
"type": "string",
|
|
10
|
-
"description": "The input image data as a base64-encoded string. If no `parameters` are provided, you can also provide the image data as a raw bytes payload."
|
|
10
|
+
"description": "The input image data as a base64-encoded string. If no `parameters` are provided, you can also provide the image data as a raw bytes payload.",
|
|
11
|
+
"comment": "type=binary"
|
|
11
12
|
},
|
|
12
13
|
"parameters": {
|
|
13
14
|
"description": "Additional inference parameters for Image Segmentation",
|