{
  "schemaVersion": "1.0",
  "item": {
    "slug": "gradio",
    "name": "Gradio",
    "source": "tencent",
    "type": "skill",
    "category": "AI 智能",
    "sourceUrl": "https://clawhub.ai/ivangdavila/gradio",
    "canonicalUrl": "https://clawhub.ai/ivangdavila/gradio",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/gradio",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=gradio",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-30T16:55:25.780Z",
      "expiresAt": "2026-05-07T16:55:25.780Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
        "contentDisposition": "attachment; filename=\"network-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/gradio"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/gradio",
    "agentPageUrl": "https://openagent3.xyz/skills/gradio/agent",
    "manifestUrl": "https://openagent3.xyz/skills/gradio/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/gradio/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Interface vs Blocks",
        "body": "gr.Interface is for single-function demos — use gr.Blocks for anything with multiple steps, conditional UI, or custom layout\nBlocks gives you .click(), .change(), .submit() event handlers — Interface only has one function\nMixing Interface inside Blocks works but creates confusing state — pick one pattern per app"
      },
      {
        "title": "State Management",
        "body": "gr.State() creates per-session state — it resets when the user refreshes the page\nState values must be JSON-serializable or Gradio silently drops them — no custom classes without serialization\nPass State as both input AND output to persist changes: fn(state) -> state — forgetting the output loses updates\nGlobal variables shared across users cause race conditions — always use gr.State() for user-specific data"
      },
      {
        "title": "Queuing and Concurrency",
        "body": "Without .queue(), long-running functions block all other users — always call demo.queue() before .launch()\nconcurrency_limit=1 on a function serializes calls — use for GPU-bound inference that can't parallelize\nmax_size in queue limits waiting users — without it, memory grows unbounded under load\nGenerator functions with yield enable streaming — but they hold a queue slot until complete"
      },
      {
        "title": "File Handling",
        "body": "Uploaded files are temp paths that get deleted after the request — copy them if you need persistence\ngr.File(type=\"binary\") returns bytes, type=\"filepath\" returns a string path — mismatching causes silent failures\nReturn gr.File(value=\"path/to/file\") for downloads, not raw bytes — the component handles content-disposition headers\nFile uploads have a default 200MB limit — set max_file_size in launch() to change it"
      },
      {
        "title": "Component Traps",
        "body": "gr.Dropdown(value=None) with allow_custom_value=False crashes if the user submits nothing — set a default or make it optional\ngr.Image(type=\"pil\") returns a PIL Image, type=\"numpy\" returns an array, type=\"filepath\" returns a path — inconsistent inputs break functions\ngr.Chatbot expects list of tuples [(user, bot), ...] — returning just strings doesn't render\nvisible=False components still run their functions — use gr.update(interactive=False) to disable without hiding"
      },
      {
        "title": "Authentication",
        "body": "auth=(\"user\", \"pass\") is plaintext in code — use auth=auth_function for production with proper credential checking\nAuth applies to the whole app — there's no per-route or per-component auth without custom middleware\nshare=True with auth still exposes auth to Gradio's servers — use your own tunnel for sensitive apps"
      },
      {
        "title": "Deployment",
        "body": "share=True creates a 72-hour public URL through Gradio's servers — not for production, just demos\nEnvironment variables in local dev don't exist in Hugging Face Spaces — use Spaces secrets or the Settings UI\nserver_name=\"0.0.0.0\" to accept external connections — default 127.0.0.1 only allows localhost\nBehind a reverse proxy, set root_path=\"/subpath\" or assets and API routes break"
      },
      {
        "title": "Events and Updates",
        "body": "Return gr.update(value=x, visible=True) to modify component properties — returning just the value only changes value\nChain events with .then() for sequential operations — parallel .click() handlers race\nevery=5 on a function polls every 5 seconds — but it holds connections open, scale carefully\ntrigger_mode=\"once\" prevents double-clicks from firing twice — default allows rapid duplicate submissions"
      },
      {
        "title": "Performance",
        "body": "cache_examples=True pre-computes example outputs at startup — speeds up demos but increases load time\nLarge model loading in the function runs per-request — load in global scope or use gr.State with initialization\nbatch=True with max_batch_size=N groups concurrent requests — essential for GPU throughput"
      }
    ],
    "body": "Gradio Patterns\nInterface vs Blocks\ngr.Interface is for single-function demos — use gr.Blocks for anything with multiple steps, conditional UI, or custom layout\nBlocks gives you .click(), .change(), .submit() event handlers — Interface only has one function\nMixing Interface inside Blocks works but creates confusing state — pick one pattern per app\nState Management\ngr.State() creates per-session state — it resets when the user refreshes the page\nState values must be JSON-serializable or Gradio silently drops them — no custom classes without serialization\nPass State as both input AND output to persist changes: fn(state) -> state — forgetting the output loses updates\nGlobal variables shared across users cause race conditions — always use gr.State() for user-specific data\nQueuing and Concurrency\nWithout .queue(), long-running functions block all other users — always call demo.queue() before .launch()\nconcurrency_limit=1 on a function serializes calls — use for GPU-bound inference that can't parallelize\nmax_size in queue limits waiting users — without it, memory grows unbounded under load\nGenerator functions with yield enable streaming — but they hold a queue slot until complete\nFile Handling\nUploaded files are temp paths that get deleted after the request — copy them if you need persistence\ngr.File(type=\"binary\") returns bytes, type=\"filepath\" returns a string path — mismatching causes silent failures\nReturn gr.File(value=\"path/to/file\") for downloads, not raw bytes — the component handles content-disposition headers\nFile uploads have a default 200MB limit — set max_file_size in launch() to change it\nComponent Traps\ngr.Dropdown(value=None) with allow_custom_value=False crashes if the user submits nothing — set a default or make it optional\ngr.Image(type=\"pil\") returns a PIL Image, type=\"numpy\" returns an array, type=\"filepath\" returns a path — inconsistent inputs break functions\ngr.Chatbot expects list of tuples [(user, bot), ...] — returning just strings doesn't render\nvisible=False components still run their functions — use gr.update(interactive=False) to disable without hiding\nAuthentication\nauth=(\"user\", \"pass\") is plaintext in code — use auth=auth_function for production with proper credential checking\nAuth applies to the whole app — there's no per-route or per-component auth without custom middleware\nshare=True with auth still exposes auth to Gradio's servers — use your own tunnel for sensitive apps\nDeployment\nshare=True creates a 72-hour public URL through Gradio's servers — not for production, just demos\nEnvironment variables in local dev don't exist in Hugging Face Spaces — use Spaces secrets or the Settings UI\nserver_name=\"0.0.0.0\" to accept external connections — default 127.0.0.1 only allows localhost\nBehind a reverse proxy, set root_path=\"/subpath\" or assets and API routes break\nEvents and Updates\nReturn gr.update(value=x, visible=True) to modify component properties — returning just the value only changes value\nChain events with .then() for sequential operations — parallel .click() handlers race\nevery=5 on a function polls every 5 seconds — but it holds connections open, scale carefully\ntrigger_mode=\"once\" prevents double-clicks from firing twice — default allows rapid duplicate submissions\nPerformance\ncache_examples=True pre-computes example outputs at startup — speeds up demos but increases load time\nLarge model loading in the function runs per-request — load in global scope or use gr.State with initialization\nbatch=True with max_batch_size=N groups concurrent requests — essential for GPU throughput"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/ivangdavila/gradio",
    "publisherUrl": "https://clawhub.ai/ivangdavila/gradio",
    "owner": "ivangdavila",
    "version": "1.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/gradio",
    "downloadUrl": "https://openagent3.xyz/downloads/gradio",
    "agentUrl": "https://openagent3.xyz/skills/gradio/agent",
    "manifestUrl": "https://openagent3.xyz/skills/gradio/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/gradio/agent.md"
  }
}