Product Updates Hugging Face Blog

Wire It, Run It, Deploy It: AI Workflows in Gradio

GradioworkflowsHugging FaceAI pipelines

Gradio's new gr.Workflow makes the pipeline itself the interface. Instead of wiring AI steps together in Python and print-debugging, you describe steps as a graph of typed nodes. Gradio serves a drag-and-drop canvas where every node is runnable and every intermediate result is visible. The same graph also becomes a REST API and can be deployed to Hugging Face Spaces with one command.

The excerpt showcases several live example Spaces. The Image Editor is a single node calling Qwen-Image-Edit on Hugging Face Inference Providers, letting users upload an image and edit it with natural language. The AI Media Studio chains real models into a graph with three pipelines: FLUX generates an image, a background-removal Gradio Space turns it into a sticker, a text-to-speech Space converts a topic into a voiceover, and an LLM call generates an episode title. Each output gets its own REST endpoint (/sticker, /voiceover, /episode_title), callable from code without opening the UI.

Generative Art Lab demonstrates fan-out: one prompt feeds FLUX for a base image, two AI re-imaginings (watercolor and cyberpunk), and an LLM-written gallery title, all generated in parallel. Data Detective fans out a HF dataset ID to four operator nodes using the Datasets Server API, producing an overview card, preview rows, per-column statistics, and a distribution chart independently and in parallel. Finally, fn nodes are plain Python, so they can also run GPU models directly, meaning not every node needs to reach out to Hugging Face.

Read original →

← Back to home