Spaces:
Running on Zero
Running on Zero
File size: 557 Bytes
b533523 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | # 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`.
|