Type Alias: CreateTransformersJsCaptionPipeline
ts
type CreateTransformersJsCaptionPipeline = (input: {
device?: TransformersJsCaptionDeviceType;
dtype?: TransformersJsCaptionDataType;
model: string;
onInitProgress?: TransformersJsCaptionProgressCallback;
}) => Promise<TransformersJsCaptionPipeline>;Defined in: src/batteries/specialists/caption/transformers_js/types.ts:75
Factory for lazily creating an image-to-text pipeline. Defaults to a dynamic import of @huggingface/transformers + pipeline('image-to-text', …); override to inject a pre-built pipeline or a test double.
Parameters
| Parameter | Type |
|---|---|
input | { device?: TransformersJsCaptionDeviceType; dtype?: TransformersJsCaptionDataType; model: string; onInitProgress?: TransformersJsCaptionProgressCallback; } |
input.device? | TransformersJsCaptionDeviceType |
input.dtype? | TransformersJsCaptionDataType |
input.model | string |
input.onInitProgress? | TransformersJsCaptionProgressCallback |
Returns
Promise<TransformersJsCaptionPipeline>