Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Hugging Face 3 min read How-to mediumAdept

Showcase Your Projects in Spaces using Gradio

Gradio's Hugging Face Hub integration lets you build an ML demo from a Hub model ID in a few lines: gr.Interface.load plus a title, description and example inputs, backed by the Inference API. You can host these demos for free on Hugging Face Spaces by adding an app.py, and wrap custom checkpoints in an Interface when the Inference API doesn't support them. Gradio's Series chains models together, shown here as a French story generator built from Opus MT translation models around a GPT-2 story generator.

Assumes: Python basics

Related posts

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

    Hugging Face mediumAdept

    Gradio's gr.Workflow turns AI pipelines into a graph of typed nodes (reference inputs, operator steps, subject outputs) served as a drag-and-drop canvas where every node is runnable and intermediate results are visible. Operators can be Python functions, Hugging Face Inference Providers models, other Gradio Spaces, or Hub dataset rows, and fan-out lets one input feed several operators in parallel. Each output automatically becomes a REST endpoint callable via gradio_client or curl, and fn nodes decorated with @spaces.GPU can run local models on ZeroGPU. Example Spaces include an image editor, a media studio chaining FLUX, background removal and TTS, and a dataset profiler.

  • Introducing Daggr: Chain apps programmatically, inspect visually

    Hugging Face mediumAdept

    Daggr is an open-source Python library from the Gradio team for chaining Gradio Spaces, Hugging Face Inference Providers models and custom Python functions into workflows defined in code, with an automatically generated visual canvas. The canvas lets you inspect intermediate outputs, change inputs and rerun individual steps, while state, cached results and multiple "sheets" persist between sessions. Three node types are covered: GradioNode, which can clone and run a Space locally with remote fallback; FnNode; and InferenceNode. A walkthrough builds an image-to-3D pipeline from background removal, downscaling, FLUX.2-klein and TRELLIS.2. The library is in beta, so APIs may change and data loss is possible during updates.

  • Run ComfyUI workflows for free with Gradio on Hugging Face Spaces

    Hugging Face mediumAdept

    A ComfyUI node workflow can be turned into a standalone Gradio app and hosted for free on Hugging Face Spaces' serverless ZeroGPU tier. The steps: export the workflow to Python with ComfyUI-to-Python-Extension, then rewrite its main() into a generate_image function whose hard-coded node values become UI inputs and which returns the saved image path. To prepare for Spaces, fetch the models with hf_hub_download instead of uploading them, wrap inference in the @spaces.GPU decorator, and merge the custom nodes' dependencies into one requirements.txt. Loading models in global scope, outside the decorated function, keeps ZeroGPU from reloading them from disk on every run.

  • Hosting your Models and Datasets on Hugging Face Spaces using Streamlit

    Hugging Face mediumAdept

    Streamlit apps can showcase Hugging Face models and datasets and be hosted on Hugging Face Spaces. The walkthrough recreates "Write with Transformer" using Streamlit widgets such as text_area, sidebar sliders and number_input to collect generation hyperparameters like temperature, top-k and top-p. It then visualizes a poetry dataset, loaded with 🤗 Datasets streaming, using st.dataframe, st.bar_chart and st.pyplot for seaborn/matplotlib plots. Deployment means dragging files into a Space, listing dependencies in requirements.txt, and matching the Streamlit version.

  • How an Agent Built a 3D Paris Gallery by Chaining Two Hugging Face Spaces

    Hugging Face mediumAdept

    Every Gradio Space on Hugging Face now exposes a plain-text agents.md describing its API schema, call/poll endpoints, file upload and auth, so a coding agent can drive a Space with no client library. A coding agent chained an image-generation Space (ideogram4) with VAST-AI/TripoSplat to produce single-image 3D Gaussian splats of Paris monuments. It also handled the glue work: flipping Y-down outputs upright, auto-framing, compressing .ply to .ksplat (~3× smaller), building a Three.js viewer and deploying a static Space. Reusing the same pipeline for Japan and Egypt galleries took one prompt each, which the author offers as evidence for Mitchell Hashimoto's 'building block economy' applied to multimedia models.

The quest for software engineering knowledge.

Look:
Layout: