Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add PracticalSwan/agent-skills --skill huggingface-gradiogit clone --depth 1 https://github.com/PracticalSwan/agent-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/practicalswan/agent-skills/huggingface-gradio)<a href="https://agentmods.dev/skills/practicalswan/agent-skills/huggingface-gradio"><img src="https://agentmods.dev/badge/skills/practicalswan/agent-skills/huggingface-gradio/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/practicalswan/agent-skills/huggingface-gradio"><img src="https://agentmods.dev/badge/skills/practicalswan/agent-skills/huggingface-gradio.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00037 | $0.07301 |
| Opus 5.5 | $0.00015 | $0.02920 |
| Sonnet 5.5 | $0.00007 | $0.01460 |
| Haiku 4.5 | $0.00004 | $0.00730 |
Grade A, and why
huggingface-gradio scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
This is a copy
97% identical to huggingface-gradio — 312 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 349 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Gradio
Gradio is a Python library for building interactive web UIs and ML demos. This skill covers the core API, patterns, and examples.
Guides
Detailed guides on specific topics (read these when relevant):
- Quickstart
- The Interface Class
- Blocks and Event Listeners
- Controlling Layout
- More Blocks Features
- Custom CSS and JS
- Streaming Outputs
- Streaming Inputs
- Sharing Your App
- Custom HTML Components
- Getting Started with the Python Client
- Getting Started with the JS Client
Core Patterns
Interface (high-level): wraps a function with input/output components.
import gradio as gr
def greet(name):
return f"Hello {name}!"
gr.Interface(fn=greet, inputs="text", outputs="text").launch()
Blocks (low-level): flexible layout with explicit event wiring.
import gradio as gr
with gr.Blocks() as demo:
name = gr.Textbox(label="Name")
output = gr.Textbox(label="Greeting")
btn = gr.Button("Greet")
btn.click(fn=lambda n: f"Hello {n}!", inputs=name, outputs=output)
demo.launch()
ChatInterface: high-level wrapper for chatbot UIs.
import gradio as gr
def respond(message, history):
return f"You said: {message}"
gr.ChatInterface(fn=respond).launch()
Key Component Signatures
Textbox(value: str | I18nData | Callable | None = None, type: Literal['text', 'password', 'email'] = "text", lines: int = 1, max_lines: int | None = None, placeholder: str | I18nData | None = None, label: str | I18nData | None = None, info: str | I18nData | None = None, every: Timer | float | None = None, inputs: Component | Sequence[Component] | set[Component] | None = None, show_label: bool | None = None, container: bool = True, scale: int | None = None, min_width: int = 160, interactive: bool | None = None, visible: bool | Literal['hidden'] = True, elem_id: str | None = None, autofocus: bool = False, autoscroll: bool = True, elem_classes: list[str] | str | None = None, render: bool = True, key: int | str | tuple[int | str, ...] | None = None, preserved_by_key: list[str] | str | None = "value", text_align: Literal['left', 'right'] | None = None, rtl: bool = False, buttons: list[Literal['copy'] | Button] | None = None, max_length: int | None = None, submit_btn: str | bool | None = False, stop_btn: str | bool | None = False, html_attributes: InputHTMLAttributes | None = None)
Creates a textarea for user to enter string input or display string output..
What ships with it
3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2mo ago Changed 13346fb8b9b1
- 2mo ago Changed ee269a2f45c4
- 3mo ago First seen · 349 lines · 37 tokens per session scan A a0b37273e085
huggingface-gradio is a skill published in the GitHub repository PracticalSwan/agent-skills (25 stars, last pushed 18d ago), licensed MIT. It adds 37 tokens to every session and 7,301 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 97% identical to huggingface-gradio, differing in 312 lines, and is treated as a copy.
huggingface-gradio compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| huggingface-gradioPracticalSwan/agent-skills | Skill | 25 | 18d ago | MIT | A | 37 | Codex |
| huggingface-tokenizersdavila7/claude-code-templates | Skill | 35k | today | MIT | A | 75 | Claude Code, Codex |
| transformerssynthetic-sciences/openscience | Skill | 4.5k | yesterday | Apache-2.0 | A | 63 | Claude Code, Codex |
| huggingfaceericrisco/rsc-harness | Skill | 707 | yesterday | MIT | A | 131 | Claude Code, Codex |
| submit-github-bug-issueNVIDIA/TensorRT-Model-Connect | Skill | 307 | today | Apache-2.0 | A | 82 | Codex |
| submit-github-prNVIDIA/TensorRT-Model-Connect | Skill | 307 | today | Apache-2.0 | A | 58 | Codex |
| add-litert-omni-modelgoogle-ai-edge/litert-samples | Skill | 511 | today | Apache-2.0 | A | 148 | Claude Code, Codex |