Ƭ AudioClassificationArgs: BaseArgs
& { data
: Blob
| ArrayBuffer
}
inference/src/tasks/audio/audioClassification.ts:5
Ƭ AudioClassificationReturn: AudioClassificationOutputValue
[]
inference/src/tasks/audio/audioClassification.ts:24
Ƭ AudioToAudioArgs: BaseArgs
& { data
: Blob
| ArrayBuffer
}
inference/src/tasks/audio/audioToAudio.ts:5
Ƭ AudioToAudioReturn: AudioToAudioOutputValue
[]
inference/src/tasks/audio/audioToAudio.ts:29
Ƭ AutomaticSpeechRecognitionArgs: BaseArgs
& { data
: Blob
| ArrayBuffer
}
inference/src/tasks/audio/automaticSpeechRecognition.ts:5
Ƭ ConversationalArgs: BaseArgs
& { inputs
: { generated_responses?
: string
[] ; past_user_inputs?
: string
[] ; text
: string
} ; parameters?
: { max_length?
: number
; max_time?
: number
; min_length?
: number
; repetition_penalty?
: number
; temperature?
: number
; top_k?
: number
; top_p?
: number
} }
inference/src/tasks/nlp/conversational.ts:5
Ƭ DocumentQuestionAnsweringArgs: BaseArgs
& { inputs
: { image
: Blob
| ArrayBuffer
; question
: string
} }
inference/src/tasks/multimodal/documentQuestionAnswering.ts:8
Ƭ FeatureExtractionArgs: BaseArgs
& { inputs
: string
| string
[] }
inference/src/tasks/nlp/featureExtraction.ts:6
Ƭ FeatureExtractionOutput: (number
| number
[] | number
[][])[]
Returned values are a multidimensional array of floats (dimension depending on if you sent a string or a list of string, and if the automatic reduction, usually mean_pooling for instance was applied for you or not. This should be explained on the model’s README).
inference/src/tasks/nlp/featureExtraction.ts:19
Ƭ FillMaskArgs: BaseArgs
& { inputs
: string
}
inference/src/tasks/nlp/fillMask.ts:5
Ƭ FillMaskOutput: { score
: number
; sequence
: string
; token
: number
; token_str
: string
}[]
inference/src/tasks/nlp/fillMask.ts:9
Ƭ ImageClassificationArgs: BaseArgs
& { data
: Blob
| ArrayBuffer
}
inference/src/tasks/cv/imageClassification.ts:5
Ƭ ImageClassificationOutput: ImageClassificationOutputValue
[]
inference/src/tasks/cv/imageClassification.ts:23
Ƭ ImageSegmentationArgs: BaseArgs
& { data
: Blob
| ArrayBuffer
}
inference/src/tasks/cv/imageSegmentation.ts:5
Ƭ ImageSegmentationOutput: ImageSegmentationOutputValue
[]
inference/src/tasks/cv/imageSegmentation.ts:27
Ƭ ImageToImageArgs: BaseArgs
& { inputs
: Blob
| ArrayBuffer
; parameters?
: { guess_mode?
: boolean
; guidance_scale?
: number
; height?
: number
; negative_prompt?
: string
; num_inference_steps?
: number
; prompt?
: string
; strength?
: number
; width?
: number
} }
inference/src/tasks/cv/imageToImage.ts:6
Ƭ ImageToImageOutput: Blob
inference/src/tasks/cv/imageToImage.ts:55
Ƭ ImageToTextArgs: BaseArgs
& { data
: Blob
| ArrayBuffer
}
inference/src/tasks/cv/imageToText.ts:5
Ƭ InferenceTask: "audio-classification"
| "audio-to-audio"
| "automatic-speech-recognition"
| "conversational"
| "depth-estimation"
| "document-question-answering"
| "feature-extraction"
| "fill-mask"
| "image-classification"
| "image-segmentation"
| "image-to-image"
| "image-to-text"
| "object-detection"
| "video-classification"
| "question-answering"
| "reinforcement-learning"
| "sentence-similarity"
| "summarization"
| "table-question-answering"
| "tabular-classification"
| "tabular-regression"
| "text-classification"
| "text-generation"
| "text-to-image"
| "text-to-speech"
| "text-to-video"
| "token-classification"
| "translation"
| "unconditional-image-generation"
| "visual-question-answering"
| "zero-shot-classification"
| "zero-shot-image-classification"
Ƭ ObjectDetectionArgs: BaseArgs
& { data
: Blob
| ArrayBuffer
}
inference/src/tasks/cv/objectDetection.ts:5
Ƭ ObjectDetectionOutput: ObjectDetectionOutputValue
[]
inference/src/tasks/cv/objectDetection.ts:33
Ƭ QuestionAnsweringArgs: BaseArgs
& { inputs
: { context
: string
; question
: string
} }
inference/src/tasks/nlp/questionAnswering.ts:5
Ƭ RequestArgs: BaseArgs
& { data
: Blob
| ArrayBuffer
} | { inputs
: unknown
} & { accessToken?
: string
; parameters?
: Record
<string
, unknown
> }
Ƭ SentenceSimilarityArgs: BaseArgs
& { inputs
: Record
<string
, unknown
> | Record
<string
, unknown
>[] }
inference/src/tasks/nlp/sentenceSimilarity.ts:6
Ƭ SentenceSimilarityOutput: number
[]
Returned values are a list of floats
inference/src/tasks/nlp/sentenceSimilarity.ts:19
Ƭ SummarizationArgs: BaseArgs
& { inputs
: string
; parameters?
: { max_length?
: number
; max_time?
: number
; min_length?
: number
; repetition_penalty?
: number
; temperature?
: number
; top_k?
: number
; top_p?
: number
} }
inference/src/tasks/nlp/summarization.ts:5
Ƭ TableQuestionAnsweringArgs: BaseArgs
& { inputs
: { query
: string
; table
: Record
<string
, string
[]> } }
inference/src/tasks/nlp/tableQuestionAnswering.ts:5
Ƭ TabularClassificationArgs: BaseArgs
& { inputs
: { data
: Record
<string
, string
[]> } }
inference/src/tasks/tabular/tabularClassification.ts:5
Ƭ TabularClassificationOutput: number
[]
A list of predicted labels for each row
inference/src/tasks/tabular/tabularClassification.ts:17
Ƭ TabularRegressionArgs: BaseArgs
& { inputs
: { data
: Record
<string
, string
[]> } }
inference/src/tasks/tabular/tabularRegression.ts:5
Ƭ TabularRegressionOutput: number
[]
a list of predicted values for each row
inference/src/tasks/tabular/tabularRegression.ts:17
Ƭ TextClassificationArgs: BaseArgs
& { inputs
: string
}
inference/src/tasks/nlp/textClassification.ts:5
Ƭ TextClassificationOutput: { label
: string
; score
: number
}[]
inference/src/tasks/nlp/textClassification.ts:12
Ƭ TextGenerationArgs: BaseArgs
& { inputs
: string
; parameters?
: { do_sample?
: boolean
; max_new_tokens?
: number
; max_time?
: number
; num_return_sequences?
: number
; repetition_penalty?
: number
; return_full_text?
: boolean
; temperature?
: number
; top_k?
: number
; top_p?
: number
; truncate?
: number
} }
inference/src/tasks/nlp/textGeneration.ts:5
Ƭ TextGenerationStreamFinishReason: "length"
| "eos_token"
| "stop_sequence"
inference/src/tasks/nlp/textGenerationStream.ts:46
Ƭ TextToImageArgs: BaseArgs
& { inputs
: string
; parameters?
: { guidance_scale?
: number
; height?
: number
; negative_prompt?
: string
; num_inference_steps?
: number
; width?
: number
} }
inference/src/tasks/cv/textToImage.ts:5
Ƭ TextToImageOutput: Blob
inference/src/tasks/cv/textToImage.ts:35
Ƭ TextToSpeechArgs: BaseArgs
& { inputs
: string
}
inference/src/tasks/audio/textToSpeech.ts:5
Ƭ TextToSpeechOutput: Blob
inference/src/tasks/audio/textToSpeech.ts:12
Ƭ TokenClassificationArgs: BaseArgs
& { inputs
: string
; parameters?
: { aggregation_strategy?
: "none"
| "simple"
| "first"
| "average"
| "max"
} }
inference/src/tasks/nlp/tokenClassification.ts:6
Ƭ TokenClassificationOutput: TokenClassificationOutputValue
[]
inference/src/tasks/nlp/tokenClassification.ts:52
Ƭ TranslationArgs: BaseArgs
& { inputs
: string
}
inference/src/tasks/nlp/translation.ts:5
Ƭ VisualQuestionAnsweringArgs: BaseArgs
& { inputs
: { image
: Blob
| ArrayBuffer
; question
: string
} }
inference/src/tasks/multimodal/visualQuestionAnswering.ts:6
Ƭ ZeroShotClassificationArgs: BaseArgs
& { inputs
: string
| string
[] ; parameters
: { candidate_labels
: string
[] ; multi_label?
: boolean
} }
inference/src/tasks/nlp/zeroShotClassification.ts:6
Ƭ ZeroShotClassificationOutput: ZeroShotClassificationOutputValue
[]
inference/src/tasks/nlp/zeroShotClassification.ts:29
Ƭ ZeroShotImageClassificationArgs: BaseArgs
& { inputs
: { image
: Blob
| ArrayBuffer
} ; parameters
: { candidate_labels
: string
[] } }
inference/src/tasks/cv/zeroShotImageClassification.ts:7
Ƭ ZeroShotImageClassificationOutput: ZeroShotImageClassificationOutputValue
[]
inference/src/tasks/cv/zeroShotImageClassification.ts:27
▸ audioClassification(args
, options?
): Promise
<AudioClassificationReturn
>
This task reads some audio input and outputs the likelihood of classes. Recommended model: superb/hubert-large-superb-er
Name | Type |
---|---|
args |
AudioClassificationArgs |
options? |
Options |
Promise
<AudioClassificationReturn
>
inference/src/tasks/audio/audioClassification.ts:30
▸ audioToAudio(args
, options?
): Promise
<AudioToAudioReturn
>
This task reads some audio input and outputs one or multiple audio files. Example model: speechbrain/sepformer-wham does audio source separation.
Name | Type |
---|---|
args |
AudioToAudioArgs |
options? |
Options |
Promise
<AudioToAudioReturn
>
inference/src/tasks/audio/audioToAudio.ts:35
▸ automaticSpeechRecognition(args
, options?
): Promise
<AutomaticSpeechRecognitionOutput
>
This task reads some audio input and outputs the said words within the audio files. Recommended model (english language): facebook/wav2vec2-large-960h-lv60-self
Name | Type |
---|---|
args |
AutomaticSpeechRecognitionArgs |
options? |
Options |
Promise
<AutomaticSpeechRecognitionOutput
>
inference/src/tasks/audio/automaticSpeechRecognition.ts:23
▸ conversational(args
, options?
): Promise
<ConversationalOutput
>
This task corresponds to any chatbot like structure. Models tend to have shorter max_length, so please check with caution when using a given model if you need long range dependency or not. Recommended model: microsoft/DialoGPT-large.
Name | Type |
---|---|
args |
ConversationalArgs |
options? |
Options |
Promise
<ConversationalOutput
>
inference/src/tasks/nlp/conversational.ts:65
▸ documentQuestionAnswering(args
, options?
): Promise
<DocumentQuestionAnsweringOutput
>
Answers a question on a document image. Recommended model: impira/layoutlm-document-qa.
Name | Type |
---|---|
args |
DocumentQuestionAnsweringArgs |
options? |
Options |
Promise
<DocumentQuestionAnsweringOutput
>
inference/src/tasks/multimodal/documentQuestionAnswering.ts:42
▸ featureExtraction(args
, options?
): Promise
<FeatureExtractionOutput
>
This task reads some text and outputs raw float values, that are usually consumed as part of a semantic database/semantic search.
Name | Type |
---|---|
args |
FeatureExtractionArgs |
options? |
Options |
Promise
<FeatureExtractionOutput
>
inference/src/tasks/nlp/featureExtraction.ts:24
▸ fillMask(args
, options?
): Promise
<FillMaskOutput
>
Tries to fill in a hole with a missing word (token to be precise). That’s the base task for BERT models.
Name | Type |
---|---|
args |
FillMaskArgs |
options? |
Options |
Promise
<FillMaskOutput
>
inference/src/tasks/nlp/fillMask.ts:31
▸ imageClassification(args
, options?
): Promise
<ImageClassificationOutput
>
This task reads some image input and outputs the likelihood of classes. Recommended model: google/vit-base-patch16-224
Name | Type |
---|---|
args |
ImageClassificationArgs |
options? |
Options |
Promise
<ImageClassificationOutput
>
inference/src/tasks/cv/imageClassification.ts:29
▸ imageSegmentation(args
, options?
): Promise
<ImageSegmentationOutput
>
This task reads some image input and outputs the likelihood of classes & bounding boxes of detected objects. Recommended model: facebook/detr-resnet-50-panoptic
Name | Type |
---|---|
args |
ImageSegmentationArgs |
options? |
Options |
Promise
<ImageSegmentationOutput
>
inference/src/tasks/cv/imageSegmentation.ts:33
▸ imageToImage(args
, options?
): Promise
<ImageToImageOutput
>
This task reads some text input and outputs an image. Recommended model: lllyasviel/sd-controlnet-depth
Name | Type |
---|---|
args |
ImageToImageArgs |
options? |
Options |
Promise
<ImageToImageOutput
>
inference/src/tasks/cv/imageToImage.ts:61
▸ imageToText(args
, options?
): Promise
<ImageToTextOutput
>
This task reads some image input and outputs the text caption.
Name | Type |
---|---|
args |
ImageToTextArgs |
options? |
Options |
Promise
<ImageToTextOutput
>
inference/src/tasks/cv/imageToText.ts:22
▸ objectDetection(args
, options?
): Promise
<ObjectDetectionOutput
>
This task reads some image input and outputs the likelihood of classes & bounding boxes of detected objects. Recommended model: facebook/detr-resnet-50
Name | Type |
---|---|
args |
ObjectDetectionArgs |
options? |
Options |
Promise
<ObjectDetectionOutput
>
inference/src/tasks/cv/objectDetection.ts:39
▸ questionAnswering(args
, options?
): Promise
<QuestionAnsweringOutput
>
Want to have a nice know-it-all bot that can answer any question?. Recommended model: deepset/roberta-base-squad2
Name | Type |
---|---|
args |
QuestionAnsweringArgs |
options? |
Options |
Promise
<QuestionAnsweringOutput
>
inference/src/tasks/nlp/questionAnswering.ts:34
▸ request<T
>(args
, options?
): Promise
<T
>
Primitive to make custom calls to the inference API
Name |
---|
T |
Name | Type |
---|---|
args |
RequestArgs |
options? |
Options & { includeCredentials? : boolean ; task? : string ; taskHint? : InferenceTask } |
Promise
<T
>
inference/src/tasks/custom/request.ts:7
▸ sentenceSimilarity(args
, options?
): Promise
<SentenceSimilarityOutput
>
Calculate the semantic similarity between one text and a list of other sentences by comparing their embeddings.
Name | Type |
---|---|
args |
SentenceSimilarityArgs |
options? |
Options |
Promise
<SentenceSimilarityOutput
>
inference/src/tasks/nlp/sentenceSimilarity.ts:24
▸ streamingRequest<T
>(args
, options?
): AsyncGenerator
<T
>
Primitive to make custom inference calls that expect server-sent events, and returns the response through a generator
Name |
---|
T |
Name | Type |
---|---|
args |
RequestArgs |
options? |
Options & { includeCredentials? : boolean ; task? : string ; taskHint? : InferenceTask } |
AsyncGenerator
<T
>
inference/src/tasks/custom/streamingRequest.ts:9
▸ summarization(args
, options?
): Promise
<SummarizationOutput
>
This task is well known to summarize longer text into shorter text. Be careful, some models have a maximum length of input. That means that the summary cannot handle full books for instance. Be careful when choosing your model.
Name | Type |
---|---|
args |
SummarizationArgs |
options? |
Options |
Promise
<SummarizationOutput
>
inference/src/tasks/nlp/summarization.ts:52
▸ tableQuestionAnswering(args
, options?
): Promise
<TableQuestionAnsweringOutput
>
Don’t know SQL? Don’t want to dive into a large spreadsheet? Ask questions in plain english! Recommended model: google/tapas-base-finetuned-wtq.
Name | Type |
---|---|
args |
TableQuestionAnsweringArgs |
options? |
Options |
Promise
<TableQuestionAnsweringOutput
>
inference/src/tasks/nlp/tableQuestionAnswering.ts:40
▸ tabularClassification(args
, options?
): Promise
<TabularClassificationOutput
>
Predicts target label for a given set of features in tabular form. Typically, you will want to train a classification model on your training data and use it with your new data of the same format. Example model: vvmnnnkv/wine-quality
Name | Type |
---|---|
args |
TabularClassificationArgs |
options? |
Options |
Promise
<TabularClassificationOutput
>
inference/src/tasks/tabular/tabularClassification.ts:24
▸ tabularRegression(args
, options?
): Promise
<TabularRegressionOutput
>
Predicts target value for a given set of features in tabular form. Typically, you will want to train a regression model on your training data and use it with your new data of the same format. Example model: scikit-learn/Fish-Weight
Name | Type |
---|---|
args |
TabularRegressionArgs |
options? |
Options |
Promise
<TabularRegressionOutput
>
inference/src/tasks/tabular/tabularRegression.ts:24
▸ textClassification(args
, options?
): Promise
<TextClassificationOutput
>
Usually used for sentiment-analysis this will output the likelihood of classes of an input. Recommended model: distilbert-base-uncased-finetuned-sst-2-english
Name | Type |
---|---|
args |
TextClassificationArgs |
options? |
Options |
Promise
<TextClassificationOutput
>
inference/src/tasks/nlp/textClassification.ts:26
▸ textGeneration(args
, options?
): Promise
<TextGenerationOutput
>
Use to continue text from a prompt. This is a very generic task. Recommended model: gpt2 (it’s a simple model, but fun to play with).
Name | Type |
---|---|
args |
TextGenerationArgs |
options? |
Options |
Promise
<TextGenerationOutput
>
inference/src/tasks/nlp/textGeneration.ts:64
▸ textGenerationStream(args
, options?
): AsyncGenerator
<TextGenerationStreamOutput
>
Use to continue text from a prompt. Same as textGeneration
but returns generator that can be read one token at a time
Name | Type |
---|---|
args |
TextGenerationArgs |
options? |
Options |
AsyncGenerator
<TextGenerationStreamOutput
>
inference/src/tasks/nlp/textGenerationStream.ts:87
▸ textToImage(args
, options?
): Promise
<TextToImageOutput
>
This task reads some text input and outputs an image. Recommended model: stabilityai/stable-diffusion-2
Name | Type |
---|---|
args |
TextToImageArgs |
options? |
Options |
Promise
<TextToImageOutput
>
inference/src/tasks/cv/textToImage.ts:41
▸ textToSpeech(args
, options?
): Promise
<TextToSpeechOutput
>
This task synthesize an audio of a voice pronouncing a given text. Recommended model: espnet/kan-bayashi_ljspeech_vits
Name | Type |
---|---|
args |
TextToSpeechArgs |
options? |
Options |
Promise
<TextToSpeechOutput
>
inference/src/tasks/audio/textToSpeech.ts:18
▸ tokenClassification(args
, options?
): Promise
<TokenClassificationOutput
>
Usually used for sentence parsing, either grammatical, or Named Entity Recognition (NER) to understand keywords contained within text. Recommended model: dbmdz/bert-large-cased-finetuned-conll03-english
Name | Type |
---|---|
args |
TokenClassificationArgs |
options? |
Options |
Promise
<TokenClassificationOutput
>
inference/src/tasks/nlp/tokenClassification.ts:57
▸ translation(args
, options?
): Promise
<TranslationOutput
>
This task is well known to translate text from one language to another. Recommended model: Helsinki-NLP/opus-mt-ru-en.
Name | Type |
---|---|
args |
TranslationArgs |
options? |
Options |
Promise
<TranslationOutput
>
inference/src/tasks/nlp/translation.ts:22
▸ visualQuestionAnswering(args
, options?
): Promise
<VisualQuestionAnsweringOutput
>
Answers a question on an image. Recommended model: dandelin/vilt-b32-finetuned-vqa.
Name | Type |
---|---|
args |
VisualQuestionAnsweringArgs |
options? |
Options |
Promise
<VisualQuestionAnsweringOutput
>
inference/src/tasks/multimodal/visualQuestionAnswering.ts:32
▸ zeroShotClassification(args
, options?
): Promise
<ZeroShotClassificationOutput
>
This task is super useful to try out classification with zero code, you simply pass a sentence/paragraph and the possible labels for that sentence, and you get a result. Recommended model: facebook/bart-large-mnli.
Name | Type |
---|---|
args |
ZeroShotClassificationArgs |
options? |
Options |
Promise
<ZeroShotClassificationOutput
>
inference/src/tasks/nlp/zeroShotClassification.ts:34
▸ zeroShotImageClassification(args
, options?
): Promise
<ZeroShotImageClassificationOutput
>
Classify an image to specified classes. Recommended model: openai/clip-vit-large-patch14-336
Name | Type |
---|---|
args |
ZeroShotImageClassificationArgs |
options? |
Options |
Promise
<ZeroShotImageClassificationOutput
>