Skip to content

Commit

Permalink
Add text-to-video to supported tasks (#2790)
Browse files Browse the repository at this point in the history
* Add text-to-video to supported tasks

* replicate text-to-speech

* complete text-to-speech examples

---------

Co-authored-by: Celina Hanouti <hanouticelina@gmail.com>
  • Loading branch information
Wauplin and hanouticelina authored Jan 27, 2025
1 parent d26ccdd commit 1d0999d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/source/en/guides/inference.md
Original file line number Diff line number Diff line change
Expand Up @@ -252,13 +252,14 @@ You might wonder why using [`InferenceClient`] instead of OpenAI's client? There
| **Audio** | [`~InferenceClient.audio_classification`] ||||||
| | [`~InferenceClient.audio_to_audio`] ||||||
| | [`~InferenceClient.automatic_speech_recognition`] ||||||
| | [`~InferenceClient.text_to_speech`] || ||||
| | [`~InferenceClient.text_to_speech`] || ||||
| **Computer Vision** | [`~InferenceClient.image_classification`] ||||||
| | [`~InferenceClient.image_segmentation`] ||||||
| | [`~InferenceClient.image_to_image`] ||||||
| | [`~InferenceClient.image_to_text`] ||||||
| | [`~InferenceClient.object_detection`] ||||||
| | [`~InferenceClient.text_to_image`] ||||||
| | [`~InferenceClient.text_to_video`] ||||||
| | [`~InferenceClient.zero_shot_image_classification`] ||||||
| **Multimodal** | [`~InferenceClient.document_question_answering`] ||||||
| | [`~InferenceClient.visual_question_answering`] ||||||
Expand Down
2 changes: 2 additions & 0 deletions src/huggingface_hub/inference/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -2714,6 +2714,7 @@ def text_to_speech(
... text="Hello world",
... model="OuteAI/OuteTTS-0.3-500M",
... )
>>> Path("hello_world.flac").write_bytes(audio)
```
Example using a third-party provider through Hugging Face Routing. Usage will be billed on your Hugging Face account.
Expand All @@ -2727,6 +2728,7 @@ def text_to_speech(
... text="Hello world",
... model="OuteAI/OuteTTS-0.3-500M",
... )
>>> Path("hello_world.flac").write_bytes(audio)
```
"""
provider_helper = get_provider_helper(self.provider, task="text-to-speech")
Expand Down
2 changes: 2 additions & 0 deletions src/huggingface_hub/inference/_generated/_async_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -2775,6 +2775,7 @@ async def text_to_speech(
... text="Hello world",
... model="OuteAI/OuteTTS-0.3-500M",
... )
>>> Path("hello_world.flac").write_bytes(audio)
```
Example using a third-party provider through Hugging Face Routing. Usage will be billed on your Hugging Face account.
Expand All @@ -2788,6 +2789,7 @@ async def text_to_speech(
... text="Hello world",
... model="OuteAI/OuteTTS-0.3-500M",
... )
>>> Path("hello_world.flac").write_bytes(audio)
```
"""
provider_helper = get_provider_helper(self.provider, task="text-to-speech")
Expand Down

0 comments on commit 1d0999d

Please sign in to comment.