Spaces:
Running
Running
| import gradio as gr | |
| # This Workflow calls the official Ideogram 4 Space | |
| # (https://huggingface.co/spaces/ideogram-ai/ideogram4) as a `kind: "space"` | |
| # operator node. Gradio's Workflow runner authenticates each Space node with the | |
| # visitor's own Hugging Face OAuth token (gradio@6.19.0 call_space passes the | |
| # resolved token to `gradio_client.Client(...)`), so no server-side API key is | |
| # required — visitors run the pipeline on their own inference entitlement. | |
| # | |
| # The /generate endpoint accepts 7 positional parameters (prompt, mode, | |
| # upsampler, width, height, seed, randomize_seed) and returns a 3-tuple of | |
| # (image, seed, caption). The node in workflow.json declares an input port per | |
| # parameter and an output port per returned value, in that exact order. | |
| gr.Workflow(graph="workflow.json").launch() |