Imported from ssrjkk/claude-skills (
.claude/skills/ai/gradio/SKILL.md). Install upstream withnpx skills add ssrjkk/claude-skills --skill gradio. Copyright stays with the author.
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
- Interface launches on shareable URL; 2. Input types work; 3. Function returns expected output