You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The number of answers to return (will be chosen by order of likelihood). Note that we return less than
2758
2740
topk answers if there are not enough options available within the context.
2759
-
return less than topk answers if there are not enough options available within the
2760
-
context.
2761
2741
Returns:
2762
2742
`List[VisualQuestionAnsweringOutputElement]`: a list of [`VisualQuestionAnsweringOutputElement`] items containing the predicted label and associated probability.
Whether multiple candidate labels can be true. If false, the scores are normalized such that the sum of
2809
2789
the label likelihoods for each sequence is 1. If true, the labels are considered independent and
2810
2790
probabilities are normalized for each candidate.
2811
-
If False, the labels are considered mutually exclusive and the probability over all labels always sums to 1. Defaults to False.
2812
2791
hypothesis_template (`str`, *optional*):
2813
2792
The sentence used in conjunction with candidateLabels to attempt the text classification by replacing
2814
2793
the placeholder with the candidate labels.
2815
-
Zero-shot classifiers are based on NLI models, which evaluate if a hypothesis is entailed in another text or not.
2816
-
For example, with hypothesis_template="This text is about {}." and labels=["economics", "politics"], the system internally creates the two hypotheses "This text is about economics." and "This text is about politics.".
2817
-
The model then evaluates for both hypotheses if they are entailed in the provided `text` or not.
2818
2794
model (`str`, *optional*):
2819
2795
The model to use for inference. Can be a model ID hosted on the Hugging Face Hub or a URL to a deployed
2820
2796
Inference Endpoint. This parameter overrides the model defined at the instance level. If not provided, the default recommended zero-shot classification model will be used.
The sentence used in conjunction with candidateLabels to attempt the text classification by replacing
2916
2892
the placeholder with the candidate labels.
2917
-
placeholder with the candidate labels.
2918
2893
Returns:
2919
2894
`List[ZeroShotImageClassificationOutputElement]`: List of [`ZeroShotImageClassificationOutputElement`] items containing the predicted labels and their confidence.
The number of answers to return (will be chosen by order of likelihood). Note that we return less than
2832
2808
topk answers if there are not enough options available within the context.
2833
-
return less than topk answers if there are not enough options available within the
2834
-
context.
2835
2809
Returns:
2836
2810
`List[VisualQuestionAnsweringOutputElement]`: a list of [`VisualQuestionAnsweringOutputElement`] items containing the predicted label and associated probability.
Whether multiple candidate labels can be true. If false, the scores are normalized such that the sum of
2884
2858
the label likelihoods for each sequence is 1. If true, the labels are considered independent and
2885
2859
probabilities are normalized for each candidate.
2886
-
If False, the labels are considered mutually exclusive and the probability over all labels always sums to 1. Defaults to False.
2887
2860
hypothesis_template (`str`, *optional*):
2888
2861
The sentence used in conjunction with candidateLabels to attempt the text classification by replacing
2889
2862
the placeholder with the candidate labels.
2890
-
Zero-shot classifiers are based on NLI models, which evaluate if a hypothesis is entailed in another text or not.
2891
-
For example, with hypothesis_template="This text is about {}." and labels=["economics", "politics"], the system internally creates the two hypotheses "This text is about economics." and "This text is about politics.".
2892
-
The model then evaluates for both hypotheses if they are entailed in the provided `text` or not.
2893
2863
model (`str`, *optional*):
2894
2864
The model to use for inference. Can be a model ID hosted on the Hugging Face Hub or a URL to a deployed
2895
2865
Inference Endpoint. This parameter overrides the model defined at the instance level. If not provided, the default recommended zero-shot classification model will be used.
The sentence used in conjunction with candidateLabels to attempt the text classification by replacing
2993
2963
the placeholder with the candidate labels.
2994
-
placeholder with the candidate labels.
2995
2964
Returns:
2996
2965
`List[ZeroShotImageClassificationOutputElement]`: List of [`ZeroShotImageClassificationOutputElement`] items containing the predicted labels and their confidence.
0 commit comments