Ƭ AudioClassificationArgs: BaseArgs
& { data
: Blob
| ArrayBuffer
}
tasks/audio/audioClassification.ts:5
Ƭ AudioClassificationReturn: AudioClassificationOutputValue
[]
tasks/audio/audioClassification.ts:24
Ƭ AutomaticSpeechRecognitionArgs: BaseArgs
& { data
: Blob
| ArrayBuffer
}
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
} }
Ƭ FeatureExtractionArgs: BaseArgs
& { inputs
: string
| string
[] }
tasks/nlp/featureExtraction.ts:5
Ƭ FeatureExtractionOutput: (number
| number
[])[]
Returned values are a list of floats, or a list of list of floats (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.
tasks/nlp/featureExtraction.ts:18
Ƭ FillMaskArgs: BaseArgs
& { inputs
: string
}
Ƭ FillMaskOutput: { score
: number
; sequence
: string
; token
: number
; token_str
: string
}[]
Ƭ ImageClassificationArgs: BaseArgs
& { data
: Blob
| ArrayBuffer
}
tasks/cv/imageClassification.ts:5
Ƭ ImageClassificationOutput: ImageClassificationOutputValue
[]
tasks/cv/imageClassification.ts:23
Ƭ ImageSegmentationArgs: BaseArgs
& { data
: Blob
| ArrayBuffer
}
tasks/cv/imageSegmentation.ts:5
Ƭ ImageSegmentationOutput: ImageSegmentationOutputValue
[]
tasks/cv/imageSegmentation.ts:27
Ƭ ImageToTextArgs: BaseArgs
& { data
: Blob
| ArrayBuffer
}
Ƭ ObjectDetectionArgs: BaseArgs
& { data
: Blob
| ArrayBuffer
}
Ƭ ObjectDetectionOutput: ObjectDetectionOutputValue
[]
tasks/cv/objectDetection.ts:33
Ƭ QuestionAnsweringArgs: BaseArgs
& { inputs
: { context
: string
; question
: string
} }
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
>[] }
tasks/nlp/sentenceSimilarity.ts:5
Ƭ SentenceSimilarityOutput: number
[]
Returned values are a list of floats
tasks/nlp/sentenceSimilarity.ts:18
Ƭ 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
} }
Ƭ TableQuestionAnsweringArgs: BaseArgs
& { inputs
: { query
: string
; table
: Record
<string
, string
[]> } }
tasks/nlp/tableQuestionAnswering.ts:5
Ƭ TextClassificationArgs: BaseArgs
& { inputs
: string
}
tasks/nlp/textClassification.ts:5
Ƭ TextClassificationOutput: { label
: string
; score
: number
}[]
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
} }
Ƭ TextGenerationStreamFinishReason: "length"
| "eos_token"
| "stop_sequence"
tasks/nlp/textGenerationStream.ts:46
Ƭ TextToImageArgs: BaseArgs
& { inputs
: string
; parameters?
: { guidance_scale?
: number
; height?
: number
; negative_prompt?
: string
; num_inference_steps?
: number
; width?
: number
} }
Ƭ TextToImageOutput: Blob
Ƭ TokenClassificationArgs: BaseArgs
& { inputs
: string
; parameters?
: { aggregation_strategy?
: "none"
| "simple"
| "first"
| "average"
| "max"
} }
tasks/nlp/tokenClassification.ts:6
Ƭ TokenClassificationOutput: TokenClassificationOutputValue
[]
tasks/nlp/tokenClassification.ts:52
Ƭ TranslationArgs: BaseArgs
& { inputs
: string
}
Ƭ ZeroShotClassificationArgs: BaseArgs
& { inputs
: string
| string
[] ; parameters
: { candidate_labels
: string
[] ; multi_label?
: boolean
} }
tasks/nlp/zeroShotClassification.ts:6
Ƭ ZeroShotClassificationOutput: ZeroShotClassificationOutputValue
[]
tasks/nlp/zeroShotClassification.ts:29
▸ 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
>
tasks/audio/audioClassification.ts:30
▸ 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
>
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
>
tasks/nlp/conversational.ts:65
▸ 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
>
tasks/nlp/featureExtraction.ts:23
▸ 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
>
▸ 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
>
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
>
tasks/cv/imageSegmentation.ts:33
▸ imageToText(args
, options?
): Promise
<ImageToTextOutput
>
This task reads some image input and outputs the text caption.
Name | Type |
---|---|
args |
ImageToTextArgs |
options? |
Options |
Promise
<ImageToTextOutput
>
▸ 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
>
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
>
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 } |
Promise
<T
>
▸ 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
>
tasks/nlp/sentenceSimilarity.ts:23
▸ 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 } |
AsyncGenerator
<T
>
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
>
▸ 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
>
tasks/nlp/tableQuestionAnswering.ts:40
▸ 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
>
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
>
tasks/nlp/textGeneration.ts:60
▸ 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
>
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
>
▸ 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
>
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
>
▸ 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
>