Gradio

Creates ML demo interfaces with Gradio, supporting images, text, audio, and video inputs/outputs.

ssrjkk Updated 2 repo stars

File contents

Gradio

Build demo web apps for machine learning models.

Quick Start

import gradio as gr
def greet(name, intensity): return "Hello " + name + "!" * intensity
demo = gr.Interface(fn=greet, inputs=[gr.Textbox(label="Name"), gr.Slider(1, 5, value=2)], outputs=gr.Textbox())
demo.launch()

Blocks Layout

with gr.Blocks() as demo:
    gr.Markdown("# My App")
    with gr.Row():
        with gr.Column(): input_img = gr.Image(); btn = gr.Button("Process")
        with gr.Column(): output_img = gr.Image()
    btn.click(fn=process, inputs=input_img, outputs=output_img)

When to Use

  • ML model demos; Team sharing; User testing; API prototyping

Validation

  1. Interface launches on shareable URL; 2. Input types work; 3. Function returns expected output

ssrjkk/claude-skills/tree/main/.claude/skills/ai/gradio commit 0bc6e76a9a

Frequently asked questions

npx skillmds@latest add ssrjkk/gradio