Spaces:
Running on Zero
Running on Zero
|
Download API_EXAMPLES.md from Peeble/PocketSora: direct link, hf CLI and curl.
- Browser
- Download file 557 Bytes
-
https://huggingface.co/spaces/Peeble/PocketSora/resolve/main/API_EXAMPLES.md
- Command line
-
hf download hf://spaces/Peeble/PocketSora/API_EXAMPLES.md
-
curl -L -o API_EXAMPLES.md https://huggingface.co/spaces/Peeble/PocketSora/resolve/main/API_EXAMPLES.md
557 Bytes
| # API examples | |
| The Space exposes the `generate` function through Gradio's built-in API. | |
| Use the API page shown in the Space UI to copy the exact client snippet for | |
| the deployed Gradio version. | |
| Python client pattern: | |
| ```python | |
| import gradio as gr | |
| client = gr.Client("YOUR_USERNAME/PocketSora") | |
| result = client.predict( | |
| "A white cat running through a neon city", | |
| "Text-to-Video", | |
| None, | |
| "16:9", | |
| 49, | |
| 30, | |
| 4, | |
| 42, | |
| api_name="/generate", | |
| ) | |
| print(result) | |
| ``` | |
| For image-to-video, provide a local image path in place of `None`. | |