PocketSora / API_EXAMPLES.md
Peeble's picture
Upload 4 files
b533523 verified
|
Raw History Blame Contribute Delete
557 Bytes

A newer version of the Gradio SDK is available: 6.31.0

Upgrade

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:

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.