From 3bb1403e348e0a359ba74db2e8278e2ec46d0510 Mon Sep 17 00:00:00 2001 From: Wauplin <11801849+Wauplin@users.noreply.github.com> Date: Thu, 19 Dec 2024 03:10:33 +0000 Subject: [PATCH] Update inference types (automated commit) --- .../_generated/types/automatic_speech_recognition.py | 5 ++--- .../inference/_generated/types/image_to_text.py | 5 ++--- .../inference/_generated/types/text_to_audio.py | 3 +-- .../inference/_generated/types/text_to_speech.py | 3 +-- 4 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/huggingface_hub/inference/_generated/types/automatic_speech_recognition.py b/src/huggingface_hub/inference/_generated/types/automatic_speech_recognition.py index 7e20a8116c..1733aae663 100644 --- a/src/huggingface_hub/inference/_generated/types/automatic_speech_recognition.py +++ b/src/huggingface_hub/inference/_generated/types/automatic_speech_recognition.py @@ -76,11 +76,10 @@ class AutomaticSpeechRecognitionGenerationParameters(BaseInferenceType): class AutomaticSpeechRecognitionParameters(BaseInferenceType): """Additional inference parameters for Automatic Speech Recognition""" + generation_parameters: Optional[AutomaticSpeechRecognitionGenerationParameters] = None + """Parametrization of the text generation process""" return_timestamps: Optional[bool] = None """Whether to output corresponding timestamps with the generated text""" - # Will be deprecated in the future when the renaming to `generation_parameters` is implemented in transformers - generate_kwargs: Optional[AutomaticSpeechRecognitionGenerationParameters] = None - """Parametrization of the text generation process""" @dataclass diff --git a/src/huggingface_hub/inference/_generated/types/image_to_text.py b/src/huggingface_hub/inference/_generated/types/image_to_text.py index d00ae3cf9c..b0c47b3f44 100644 --- a/src/huggingface_hub/inference/_generated/types/image_to_text.py +++ b/src/huggingface_hub/inference/_generated/types/image_to_text.py @@ -76,11 +76,10 @@ class ImageToTextGenerationParameters(BaseInferenceType): class ImageToTextParameters(BaseInferenceType): """Additional inference parameters for Image To Text""" + generation_parameters: Optional[ImageToTextGenerationParameters] = None + """Parametrization of the text generation process""" max_new_tokens: Optional[int] = None """The amount of maximum tokens to generate.""" - # Will be deprecated in the future when the renaming to `generation_parameters` is implemented in transformers - generate_kwargs: Optional[ImageToTextGenerationParameters] = None - """Parametrization of the text generation process""" @dataclass diff --git a/src/huggingface_hub/inference/_generated/types/text_to_audio.py b/src/huggingface_hub/inference/_generated/types/text_to_audio.py index 0a6d64e4d9..84a2e33acb 100644 --- a/src/huggingface_hub/inference/_generated/types/text_to_audio.py +++ b/src/huggingface_hub/inference/_generated/types/text_to_audio.py @@ -76,8 +76,7 @@ class TextToAudioGenerationParameters(BaseInferenceType): class TextToAudioParameters(BaseInferenceType): """Additional inference parameters for Text To Audio""" - # Will be deprecated in the future when the renaming to `generation_parameters` is implemented in transformers - generate_kwargs: Optional[TextToAudioGenerationParameters] = None + generation_parameters: Optional[TextToAudioGenerationParameters] = None """Parametrization of the text generation process""" diff --git a/src/huggingface_hub/inference/_generated/types/text_to_speech.py b/src/huggingface_hub/inference/_generated/types/text_to_speech.py index 12f6b50e4d..7c43837425 100644 --- a/src/huggingface_hub/inference/_generated/types/text_to_speech.py +++ b/src/huggingface_hub/inference/_generated/types/text_to_speech.py @@ -76,8 +76,7 @@ class TextToSpeechGenerationParameters(BaseInferenceType): class TextToSpeechParameters(BaseInferenceType): """Additional inference parameters for Text To Speech""" - # Will be deprecated in the future when the renaming to `generation_parameters` is implemented in transformers - generate_kwargs: Optional[TextToSpeechGenerationParameters] = None + generation_parameters: Optional[TextToSpeechGenerationParameters] = None """Parametrization of the text generation process"""