This page lists the types (e.g. dataclasses) available for each task supported on the Hugging Face Hub. Each task is specified using a JSON schema, and the types are generated from these schemas - with some customization due to Python requirements. Visit @huggingface.js/tasks to find the JSON schemas for each task.
This part of the lib is still under development and will be improved in future releases.
Inputs for Audio Classification inference
Outputs for Audio Classification inference
( function_to_apply: Optional top_k: Optional )
Additional inference parameters Additional inference parameters for Audio Classification
Inputs for Audio to Audio inference
( blob: Any content_type: str label: str )
Outputs of inference for the Audio To Audio task A generated audio file with its label.
( inputs: Any parameters: Optional )
Inputs for Automatic Speech Recognition inference
Outputs of inference for the Automatic Speech Recognition task
( text: str timestamps: List )
( generate: Optional return_timestamps: Optional )
Additional inference parameters Additional inference parameters for Automatic Speech Recognition
( do_sample: Optional early_stopping: Union epsilon_cutoff: Optional eta_cutoff: Optional max_length: Optional max_new_tokens: Optional min_length: Optional min_new_tokens: Optional num_beam_groups: Optional num_beams: Optional penalty_alpha: Optional temperature: Optional top_k: Optional top_p: Optional typical_p: Optional use_cache: Optional )
Parametrization of the text generation process Ad-hoc parametrization of the text generation process
Inputs for Depth Estimation inference
Outputs of inference for the Depth Estimation task
( inputs: DocumentQuestionAnsweringInputData parameters: Optional )
Inputs for Document Question Answering inference
One (document, question) pair to answer
( answer: str end: int score: float start: int words: List )
Outputs of inference for the Document Question Answering task
( doc_stride: Optional handle_impossible_answer: Optional lang: Optional max_answer_len: Optional max_question_len: Optional max_seq_len: Optional top_k: Optional word_boxes: Optional )
Additional inference parameters Additional inference parameters for Document Question Answering
Inputs for Text Embedding inference
Inputs for Fill Mask inference
( score: float sequence: str token: int token_str: Any fill_mask_output_token_str: Optional )
Outputs of inference for the Fill Mask task
Additional inference parameters Additional inference parameters for Fill Mask
Inputs for Image Classification inference
Outputs of inference for the Image Classification task
( function_to_apply: Optional top_k: Optional )
Additional inference parameters Additional inference parameters for Image Classification
Inputs for Image Segmentation inference
( label: str mask: Any score: Optional )
Outputs of inference for the Image Segmentation task A predicted mask / segment
( mask_threshold: Optional overlap_mask_area_threshold: Optional subtask: Optional threshold: Optional )
Additional inference parameters Additional inference parameters for Image Segmentation
Inputs for Image To Image inference
Outputs of inference for the Image To Image task
( guidance_scale: Optional negative_prompt: Optional num_inference_steps: Optional target_size: Optional )
Additional inference parameters Additional inference parameters for Image To Image
The size in pixel of the output image
( do_sample: Optional early_stopping: Union epsilon_cutoff: Optional eta_cutoff: Optional max_length: Optional max_new_tokens: Optional min_length: Optional min_new_tokens: Optional num_beam_groups: Optional num_beams: Optional penalty_alpha: Optional temperature: Optional top_k: Optional top_p: Optional typical_p: Optional use_cache: Optional )
Parametrization of the text generation process Ad-hoc parametrization of the text generation process
Inputs for Image To Text inference
( generated_text: Any image_to_text_output_generated_text: Optional )
Outputs of inference for the Image To Text task
( generate: Optional max_new_tokens: Optional )
Additional inference parameters Additional inference parameters for Image To Text
The predicted bounding box. Coordinates are relative to the top left corner of the input image.
Inputs for Object Detection inference
( box: BoundingBox label: str score: float )
Outputs of inference for the Object Detection task
Additional inference parameters Additional inference parameters for Object Detection
( inputs: QuestionAnsweringInputData parameters: Optional )
Inputs for Question Answering inference
One (context, question) pair to answer
( answer: str end: int score: float start: int )
Outputs of inference for the Question Answering task
( align_to_words: Optional doc_stride: Optional handle_impossible_answer: Optional max_answer_len: Optional max_question_len: Optional max_seq_len: Optional top_k: Optional )
Additional inference parameters Additional inference parameters for Question Answering
( inputs: SentenceSimilarityInputData parameters: Optional )
Inputs for Sentence similarity inference
( sentences: List source_sentence: str )
Inputs for Summarization inference Inputs for Text2text Generation inference
( summary_text: Any summarization_output_summary_text: Optional )
Outputs for Summarization inference Outputs of inference for the Text2text Generation task
( clean_up_tokenization_spaces: Optional generate_parameters: Optional truncation: Optional )
Additional inference parameters Additional inference parameters for Text2text Generation
( inputs: TableQuestionAnsweringInputData parameters: Optional )
Inputs for Table Question Answering inference
One (table, question) pair to answer
( answer: str cells: List coordinates: List aggregator: Optional )
Outputs of inference for the Table Question Answering task
Inputs for Text2text Generation inference
( generated_text: Any text2_text_generation_output_generated_text: Optional )
Outputs of inference for the Text2text Generation task
( clean_up_tokenization_spaces: Optional generate_parameters: Optional truncation: Optional )
Additional inference parameters Additional inference parameters for Text2text Generation
Inputs for Text Classification inference
Outputs of inference for the Text Classification task
( function_to_apply: Optional top_k: Optional )
Additional inference parameters Additional inference parameters for Text Classification
Inputs for Text Generation inference
Outputs for Text Generation inference
( finish_reason: FinishReason generated_tokens: int prefill: List tokens: List best_of_sequences: Optional seed: Optional )
When enabled, details about the generation
( best_of: Optional decoder_input_details: Optional details: Optional do_sample: Optional max_new_tokens: Optional repetition_penalty: Optional return_full_text: Optional seed: Optional stop_sequences: Optional temperature: Optional top_k: Optional top_p: Optional truncate: Optional typical_p: Optional watermark: Optional )
Additional inference parameters Additional inference parameters for Text Generation
( finish_reason: FinishReason generated_text: int generated_tokens: int prefill: List tokens: List seed: Optional )
( do_sample: Optional early_stopping: Union epsilon_cutoff: Optional eta_cutoff: Optional max_length: Optional max_new_tokens: Optional min_length: Optional min_new_tokens: Optional num_beam_groups: Optional num_beams: Optional penalty_alpha: Optional temperature: Optional top_k: Optional top_p: Optional typical_p: Optional use_cache: Optional )
Parametrization of the text generation process Ad-hoc parametrization of the text generation process
Inputs for Text To Audio inference
( audio: Any sampling_rate: Any text_to_audio_output_sampling_rate: Optional )
Outputs of inference for the Text To Audio task
Additional inference parameters Additional inference parameters for Text To Audio
The size in pixel of the output image
Inputs for Text To Image inference
Outputs of inference for the Text To Image task
( guidance_scale: Optional negative_prompt: Optional num_inference_steps: Optional scheduler: Optional target_size: Optional )
Additional inference parameters Additional inference parameters for Text To Image
( do_sample: Optional early_stopping: Union epsilon_cutoff: Optional eta_cutoff: Optional max_length: Optional max_new_tokens: Optional min_length: Optional min_new_tokens: Optional num_beam_groups: Optional num_beams: Optional penalty_alpha: Optional temperature: Optional top_k: Optional top_p: Optional typical_p: Optional use_cache: Optional )
Parametrization of the text generation process Ad-hoc parametrization of the text generation process
Additional inference parameters Additional inference parameters for Text To Audio
Inputs for Text to Speech inference Inputs for Text To Audio inference
( audio: Any sampling_rate: Any text_to_speech_output_sampling_rate: Optional )
Outputs for Text to Speech inference Outputs of inference for the Text To Audio task
Inputs for Token Classification inference
( label: Any score: float end: Optional entity_group: Optional start: Optional word: Optional )
Outputs of inference for the Token Classification task
( aggregation_strategy: Optional ignore_labels: Optional stride: Optional )
Additional inference parameters Additional inference parameters for Token Classification
( clean_up_tokenization_spaces: Optional generate_parameters: Optional truncation: Optional )
Additional inference parameters Additional inference parameters for Text2text Generation
Inputs for Translation inference Inputs for Text2text Generation inference
( translation_text: Any translation_output_translation_text: Optional )
Outputs for Translation inference Outputs of inference for the Text2text Generation task
Inputs for Video Classification inference
Outputs of inference for the Video Classification task
( frame_sampling_rate: Optional function_to_apply: Optional num_frames: Optional top_k: Optional )
Additional inference parameters Additional inference parameters for Video Classification
( inputs: VisualQuestionAnsweringInputData parameters: Optional )
Inputs for Visual Question Answering inference
One (image, question) pair to answer
( label: Any score: float answer: Optional )
Outputs of inference for the Visual Question Answering task
Additional inference parameters Additional inference parameters for Visual Question Answering
( inputs: ZeroShotClassificationInputData parameters: Optional )
Inputs for Zero Shot Classification inference
( candidate_labels: List text: str )
The input text data, with candidate labels
Outputs of inference for the Zero Shot Classification task
( hypothesis_template: Optional multi_label: Optional )
Additional inference parameters Additional inference parameters for Zero Shot Classification
( inputs: ZeroShotImageClassificationInputData parameters: Optional )
Inputs for Zero Shot Image Classification inference
( candidate_labels: List image: Any )
The input image data, with candidate labels
( label: str score: float )
Outputs of inference for the Zero Shot Image Classification task
( hypothesis_template: Optional )
Additional inference parameters Additional inference parameters for Zero Shot Image Classification
The predicted bounding box. Coordinates are relative to the top left corner of the input image.
( inputs: ZeroShotObjectDetectionInputData parameters: Optional )
Inputs for Zero Shot Object Detection inference
( candidate_labels: List image: Any )
The input image data, with candidate labels
( box: BoundingBox label: str score: float )
Outputs of inference for the Zero Shot Object Detection task