Chuyển đến nội dung
Skillpedia
Agent48k · #4849

huggingface-spaces

Skill này làm gì

Công cụ này cho phép bạn tạo và quản lý ứng dụng AI trên Hugging Face Spaces. Bạn có thể lưu trữ mô hình riêng và các bản demo tương tác của mình.

Khi nào nên dùng

  • ✓Khi bạn muốn trình diễn một mô hình AI cho người khác.
  • ✓Khi bạn có code AI và muốn đưa nó lên mạng.
  • ✓Khi bạn muốn thử các cấu hình phần cứng khác nhau cho ứng dụng AI.

Liên kết skill

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/huggingface-spaces/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/huggingface-spaces/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Tạo một Hugging Face Space để demo mô hình nhận diện hình ảnh của tôi, dùng Gradio và phần cứng ZeroGPU.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Bạn xác định loại ứng dụng (Gradio, Docker hoặc Static) và phần cứng mong muốn. Công cụ lo việc thiết lập môi trường và triển khai lên Hugging Face.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

Hugging Face Spaces

When to Use

Use this skill when you need build, deploy, and maintain applications on Hugging Face Spaces — Gradio / Docker / Static SDKs, ZeroGPU and dedicated hardware, model loading, debugging, buckets, inference providers, community grants. Use whenever the user asks to create or host an app on Hugging Face, port code onto...

Hugging Face Spaces host machine-learning applications. There are 1M+ today; each Space is a git repo. This skill covers creating, building, debugging, and maintaining them.

0. Getting ready

Before anything else:

  1. Check the hf CLI is installed: which hf. If not, pip install -U huggingface_hub.
  2. Check the user is logged in: hf auth whoami. If not, ask them to run ! hf auth login in this session — they'll need a write-scoped token from https://huggingface.co/settings/tokens.
  3. Note whoami's canPay and isPro flags — they gate hardware choices below.

The hf-cli skill teaches an agent every hf command and is the recommended companion to this one. Install it with hf skills add hf-cli (add --claude --global to install for Claude Code as well, user-level).

1. What a Space is

A Space is a git repo with three possible SDKs:

  • Gradio — most Spaces. Python, fast iteration, supports ZeroGPU.
  • Docker — arbitrary container. Use when you need a non-Python stack or a pre-built template (Streamlit, Argilla, Shiny, etc. — full list at https://huggingface.co/docs/hub/spaces-sdks-docker). Does not support ZeroGPU.
  • Static — plain HTML, or a React/Svelte/Vue project built at deploy time. Use for in-browser ML (transformers.js / WebGPU / WebAssembly / onnxruntime-web), project pages, interactive reports, or Spaces that orchestrate other Spaces. No hardware needed.

Hardware tiers

Free, no creator cost: cpu-basic and zero-a10g (ZeroGPU). Static Spaces are also free and don't need hardware.

cpu-basic — 2 vCPU / 16 GB. For data viz, API-proxy Spaces, small CPU-bound models.

ZeroGPU (zero-a10g) — dynamic, per-request GPU allocation on NVIDIA RTX PRO 6000 Blackwell (sm_120). Two sizes: large (half MIG, 48 GB, 1× quota) and xlarge (full, 96 GB, 2× quota). Free for the Space creator; Space visitors consume their own daily quota (~5 min free / 40 min Pro / 60 min Enterprise). Gradio-only, PyTorch-first. Requires the creator to be on a PRO / Team / Enterprise plan.

Dedicated GPU (T4, L4, A10G, L40S, A100, H200) — billed to the Space creator by the hour. List + pricing: hf spaces hardware. Only the creator can attach these, and only if canPay=True. Use when ZeroGPU genuinely doesn't fit — non-PyTorch main model with heavy init, very-large-model long-context inference, etc.

If a non-PRO user has a use case that wants ZeroGPU, you can still build it: create a cpu-basic Space, code the app for ZeroGPU, push, then request a community grant. See references/grants.md.

For the authoritative reference: https://huggingface.co/docs/hub/spaces-overview

2. Look for an existing demo first

Before deciding how to build anything, search for prior art:

hf spaces search "<model name or task>" --sdk gradio --limit 10

If someone has built a similar Space, read its app.py and requirements.txt — that gives you the working pattern. Saves a lot of blind iteration. Mention to the user what you found before committing to an approach.

3. Decide SDK and hardware

Follow the user's explicit request first. If they were vague:

  • Default for a public ML demo: Gradio + ZeroGPU. Use this unless something below applies.
  • The model's only inference path is non-PyTorch (ONNX / TF / JAX / vLLM as the MAIN model, with heavy init): dedicated GPU.
    • But: marginal non-torch tools (a small ONNX preprocessor, a TF utility) inside a torch-main pipeline are fine on ZeroGPU. The hijack only patches torch; init the non-torch lib inside @spaces.GPU and pay the short per-call init cost.
  • Tiny / CPU-bound model, or API-proxy Space: cpu-basic (hardware-free isn't applicable to Gradio).
  • Browser-side ML or project page: Static.
  • Container with non-Python stack: Docker.

Sourcing the model

…

Câu hỏi thường gặp

Hugging Face Spaces là gì?

Đó là nền tảng để xây dựng, lưu trữ và chia sẻ các ứng dụng học máy.

Tôi có thể lưu trữ loại ứng dụng nào?

Bạn có thể lưu trữ ứng dụng xây bằng Gradio (để demo nhanh), Docker (cho mọi loại ứng dụng) hoặc Static (cho website hoặc ứng dụng web đơn giản).

Tôi có phải trả tiền cho phần cứng không?

Có những lựa chọn miễn phí như `cpu-basic` và `zero-a10g` (ZeroGPU). Phần cứng riêng được tính phí theo giờ.

Chi tiết

Mô tả gốc của tác giả

Build, deploy, and maintain applications on Hugging Face Spaces — Gradio / Docker / Static SDKs, ZeroGPU and dedicated hardware, model loading, debugging, buckets, inference providers, community grants.

repo: sickn33/agentic-awesome-skills

Độ phổ biến

Sao GitHub
48k
Vị trí xếp hạng
#4849
Giấy phép
MIT
Cập nhật
15/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự