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
>>> client.document_question_answering(image="https://huggingface.co/spaces/impira/docquery/resolve/2359223c1837a7587402bda0f2643382a6eefeab/invoice.png", question="What is the invoice number?")
The function to apply to the model outputs in order to retrieve the scores.
1816
1816
1817
1817
Returns:
1818
1818
`List[TextClassificationOutputElement]`: a list of [`TextClassificationOutputElement`] items containing the predicted label and associated probability.
@@ -2484,11 +2484,11 @@ def text_to_speech(
2484
2484
max_length (`int`, *optional*):
2485
2485
The maximum length (in tokens) of the generated text, including the input.
2486
2486
max_new_tokens (`int`, *optional*):
2487
-
The maximum number of tokens to generate. Takes precedence over maxLength.
2487
+
The maximum number of tokens to generate. Takes precedence over max_length.
2488
2488
min_length (`int`, *optional*):
2489
2489
The minimum length (in tokens) of the generated text, including the input.
2490
2490
min_new_tokens (`int`, *optional*):
2491
-
The minimum number of tokens to generate. Takes precedence over maxLength.
2491
+
The minimum number of tokens to generate. Takes precedence over min_length.
2492
2492
num_beam_groups (`int`, *optional*):
2493
2493
Number of groups to divide num_beams into in order to ensure diversity among different groups of beams.
2494
2494
See [this paper](https://hf.co/papers/1610.02424) for more details.
the label likelihoods for each sequence is 1. If true, the labels are considered independent and
2792
2792
probabilities are normalized for each candidate.
2793
2793
hypothesis_template (`str`, *optional*):
2794
-
The sentence used in conjunction with candidateLabels to attempt the text classification by replacing
2795
-
the placeholder with the candidate labels.
2794
+
The sentence used in conjunction with `candidate_labels` to attempt the text classification by
2795
+
replacing the placeholder with the candidate labels.
2796
2796
model (`str`, *optional*):
2797
2797
The model to use for inference. Can be a model ID hosted on the Hugging Face Hub or a URL to a deployed
2798
2798
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.
2799
2799
2800
+
2800
2801
Returns:
2801
2802
`List[ZeroShotClassificationOutputElement]`: List of [`ZeroShotClassificationOutputElement`] items containing the predicted labels and their confidence.
The model to use for inference. Can be a model ID hosted on the Hugging Face Hub or a URL to a deployed
2909
2910
Inference Endpoint. This parameter overrides the model defined at the instance level. If not provided, the default recommended zero-shot image classification model will be used.
2910
2911
hypothesis_template (`str`, *optional*):
2911
-
The sentence used in conjunction with candidateLabels to attempt the text classification by replacing
2912
-
the placeholder with the candidate labels.
2912
+
The sentence used in conjunction with `candidate_labels` to attempt the image classification by
2913
+
replacing the placeholder with the candidate labels.
2913
2914
2914
2915
Returns:
2915
2916
`List[ZeroShotImageClassificationOutputElement]`: List of [`ZeroShotImageClassificationOutputElement`] items containing the predicted labels and their confidence.
>>> from huggingface_hub import AsyncInferenceClient
1026
1026
>>> client = AsyncInferenceClient()
1027
1027
>>> await client.document_question_answering(image="https://huggingface.co/spaces/impira/docquery/resolve/2359223c1837a7587402bda0f2643382a6eefeab/invoice.png", question="What is the invoice number?")
The function to apply to the model outputs in order to retrieve the scores.
1878
1878
1879
1879
Returns:
1880
1880
`List[TextClassificationOutputElement]`: a list of [`TextClassificationOutputElement`] items containing the predicted label and associated probability.
@@ -2549,11 +2549,11 @@ async def text_to_speech(
2549
2549
max_length (`int`, *optional*):
2550
2550
The maximum length (in tokens) of the generated text, including the input.
2551
2551
max_new_tokens (`int`, *optional*):
2552
-
The maximum number of tokens to generate. Takes precedence over maxLength.
2552
+
The maximum number of tokens to generate. Takes precedence over max_length.
2553
2553
min_length (`int`, *optional*):
2554
2554
The minimum length (in tokens) of the generated text, including the input.
2555
2555
min_new_tokens (`int`, *optional*):
2556
-
The minimum number of tokens to generate. Takes precedence over maxLength.
2556
+
The minimum number of tokens to generate. Takes precedence over min_length.
2557
2557
num_beam_groups (`int`, *optional*):
2558
2558
Number of groups to divide num_beams into in order to ensure diversity among different groups of beams.
2559
2559
See [this paper](https://hf.co/papers/1610.02424) for more details.
the label likelihoods for each sequence is 1. If true, the labels are considered independent and
2861
2861
probabilities are normalized for each candidate.
2862
2862
hypothesis_template (`str`, *optional*):
2863
-
The sentence used in conjunction with candidateLabels to attempt the text classification by replacing
2864
-
the placeholder with the candidate labels.
2863
+
The sentence used in conjunction with `candidate_labels` to attempt the text classification by
2864
+
replacing the placeholder with the candidate labels.
2865
2865
model (`str`, *optional*):
2866
2866
The model to use for inference. Can be a model ID hosted on the Hugging Face Hub or a URL to a deployed
2867
2867
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.
2868
2868
2869
+
2869
2870
Returns:
2870
2871
`List[ZeroShotClassificationOutputElement]`: List of [`ZeroShotClassificationOutputElement`] items containing the predicted labels and their confidence.
The model to use for inference. Can be a model ID hosted on the Hugging Face Hub or a URL to a deployed
2980
2981
Inference Endpoint. This parameter overrides the model defined at the instance level. If not provided, the default recommended zero-shot image classification model will be used.
2981
2982
hypothesis_template (`str`, *optional*):
2982
-
The sentence used in conjunction with candidateLabels to attempt the text classification by replacing
2983
-
the placeholder with the candidate labels.
2983
+
The sentence used in conjunction with `candidate_labels` to attempt the image classification by
2984
+
replacing the placeholder with the candidate labels.
2984
2985
2985
2986
Returns:
2986
2987
`List[ZeroShotImageClassificationOutputElement]`: List of [`ZeroShotImageClassificationOutputElement`] items containing the predicted labels and their confidence.
0 commit comments