huggingface-spaces

Build, deploy, debug, and maintain Hugging Face Spaces using Gradio, Docker, or Static SDKs.

507|40|Updated Apr 26, 2026
One-click install
npx skills add https://github.com/waybarrios/opencode-power-pack --skill huggingface-spaces-waybarrios
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: huggingface-spaces
Source: https://github.com/waybarrios/opencode-power-pack/tree/main/skills/huggingface-spaces
Command: npx skills add https://github.com/waybarrios/opencode-power-pack --skill huggingface-spaces-waybarrios

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires huggingface_hub, gradio, gradio_client, torch, diffusers, transformers, and includes references (resource) components.

What problem does it solve? Deploying machine-learning demos on Hugging Face Spaces involves many platform-specific pitfalls: ZeroGPU runtime constraints, hardware selection, dependency pinning, silent build failures, and stateless storage. This Skill guides an agent through the full lifecycle of creating, building, verifying, and debugging a Space so it actually works in production. ## Core Features & Use Cases - Space creation and configuration: Create Gradio, Docker, or Static Spaces with the correct SDK, hardware flavor (cpu-basic, ZeroGPU, dedicated GPU), secrets, and README frontmatter via the hf CLI. - ZeroGPU deployment patterns: Enforces the critical rules for ZeroGPU apps, such as importing spaces before torch, loading models at module scope, and decorating functions with @spaces.GPU. - Verification and debugging workflows: Provides a four-step smoke-test procedure (stage check, log inspection, gradio_client API call, output validation) plus a rung ladder from hot-reload to factory reboot, and a catalog of known errors. - Use Case: A user asks to deploy a finetuned Hunyuan3D model as a public demo. The Skill checks for prior art, duplicates the official Space, swaps the checkpoint repo, pushes with hf upload --repo-type space, and verifies the live endpoint returns a valid GLB mesh. ## Quick Start Ask the agent to create and deploy a Hugging Face Space for your model, for example: "Build a Gradio Space on ZeroGPU that runs my diffusion model and verify the API works."

Frequently Asked Questions about huggingface-spaces

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I deploy a model to Hugging Face Spaces?▼

Create the Space with `hf repos create <ns>/<name> --type space --space-sdk gradio --flavor zero-a10g`, write app.py and README frontmatter, then push with `hf upload <ns>/<name> . --repo-type space`. Verify with `hf spaces logs` and a gradio_client call against the live URL.

How do I use ZeroGPU in a Gradio Space?▼

Import `spaces` before torch or any CUDA-touching import, load the model at module scope with `.to("cuda")`, and decorate the inference function with `@spaces.GPU(duration=...)`. ZeroGPU is Gradio-only, PyTorch-first, and requires the creator to have a PRO, Team, or Enterprise plan.

What hardware options does Hugging Face Spaces support?▼

Free tiers are cpu-basic (2 vCPU, 16 GB) and ZeroGPU (zero-a10g, RTX PRO 6000 Blackwell). Dedicated GPUs (T4, L4, A10G, L40S, A100, H200) are billed hourly to the creator and require payment capability. List options with `hf spaces hardware`.

Why does my Hugging Face Space show RUNNING but the app is broken?▼

RUNNING only means the process started. Check `hf spaces logs <id> --tail 200` for silent fallbacks like dtype downgrades or missing optional dependencies, then call the API with gradio_client and validate the returned file bytes, not just the HTTP 200 status.

Can Hugging Face Spaces store data permanently?▼

Spaces are stateless and /data is wiped on restart. Mount a bucket with `hf buckets create` and `hf spaces volumes set` for durable storage. Do not use buckets as a model-weights cache, since S3-paced I/O stalls model loading.

Why do CUDA extensions fail to install in my Space build?▼

The ZeroGPU build container has no CUDA toolkit or GPU, so packages compiling CUDA at pip-install time fail. Use prebuilt Blackwell wheels matching the torch and Python tags, commit the wheel to the Space repo, or JIT-compile at startup with TORCH_CUDA_ARCH_LIST forced.