Langsung ke konten
Skillpedia
Agen48k Β· #4848

huggingface-lora-space-builder

Fungsinya

Alat ini membuat demo interaktif (sebuah 'space') di situs Hugging Face untuk model AI bernama LoRA. Dengan begitu, orang lain bisa langsung mencoba LoRA Anda melalui browser mereka.

Kapan dipakai

  • βœ“Saat Anda ingin menunjukkan LoRA yang sudah Anda buat kepada teman.
  • βœ“Saat Anda ingin orang lain menguji LoRA yang Anda unduh.
  • βœ“Saat Anda ingin membagikan LoRA tanpa mengharuskan orang lain menginstal apa pun.

Link skill

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

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/huggingface-lora-space-builder/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit β†’

Contoh permintaan ke AI

β€œBuatkan Hugging Face space untuk LoRA saya bernama 'my-awesome-lora'.”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Alat ini mengambil informasi LoRA Anda, memilih pengaturan terbaik, lalu membangun situs sederhana untuk Anda uji. Setelah itu, situs ini dipublikasikan di Hugging Face Spaces.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.

Gradio LoRA Space Builder

When to Use

Use this skill when you need build and publish a Gradio demo on Hugging Face Spaces for a user-provided LoRA. Use when someone asks to create, generate, ship, or publish a Space, demo, Gradio app, or playground for a LoRA β€” including LoRAs for Qwen-Image, Qwen-Image-Edit, LTX-Video, Wan, FLUX, SDXL, or other...

Build and publish a Gradio demo on Hugging Face Spaces that runs inference with a user-provided LoRA. Use whenever someone asks to create, generate, ship, or publish "a Space", "a demo", "a Gradio app", or "a playground" for a LoRA β€” whether the base model is Qwen-Image, Qwen-Image-Edit, LTX, or another diffusion model. Also use when someone describes a LoRA they trained or hosts on the Hub and wants to share it. The default target is ZeroGPU hardware and the default inference library is diffusers when the base model supports it.

The output is a real, published Space (private by default) that the user can try in the browser, not a local script.

What "good" looks like for these demos

The demo should feel handcrafted for this specific LoRA, not a generic template with the LoRA bolted on. Two LoRAs that share a task can still need different demos: a pose-control video LoRA and an outpainting video LoRA both take video in and produce video out, but the inputs the user provides, the preprocessing, and the controls are completely different. Recognizing that is the central job here.

Concretely, a good demo:

  • Loads fast and runs fast β€” minimal model loading, sensible step count, no wasted computation per call.
  • Has a UI with exactly the controls this LoRA needs and nothing else. Excess sliders are a cost, not a feature.
  • Shows the user what's happening β€” progress, intermediate outputs where useful, the seed used, a clear error when input is missing.
  • Honors the LoRA's own recommendations from its model card: trigger words, recommended step count, recommended guidance scale, recommended LoRA scale, example inputs.
  • Is creative where creativity helps β€” interactive canvases, before/after sliders, side-by-side previews of intermediate processing β€” and plain where plainness is right.

Workflow

Work through these phases in order. Information gathered in one phase decides the next.

  1. Gather the LoRA info needed to pick a pipeline and design a UI.
  2. Pick the base pipeline and inference recipe.
  3. Design the UI for this specific LoRA's task and inputs.
  4. Write app.py, requirements.txt, and README.md together; show all three to the user for one batched approval.
  5. Publish the Space (private).

Don't drip-feed questions across multiple turns. Batch them.


Phase 1 β€” Gather LoRA info

Required: a LoRA repo on the Hub (e.g. username/my-lora).

First, try to read the repo without a token. If it succeeds, the repo is public β€” proceed. If it fails with 401/403, the repo is private/gated and you need an authenticated session to read it. Don't immediately ask for a token. Check first whether the user is already authenticated.

from huggingface_hub import HfApi, get_token

cached_token = get_token()  # picks up HF_TOKEN env var or cached CLI login
if cached_token:
    try:
        info = HfApi().whoami(token=cached_token)
        username = info["name"]
        # info also has fine-grained token scope info if applicable
    except Exception:
        cached_token = None  # token exists but is invalid/expired

Then:

  • If a valid cached token exists and it can read the repo, use it. No prompt needed.
  • If no cached token, or the cached token can't read this private repo, ask the user for a token β€” once, with the explanation below.

When asking for a token (and only when you actually need to ask):

I need a Hugging Face access token with write scope (to read the LoRA if it's private/gated, and to publish the Space). Create one at https://huggingface.co/settings/tokens. Paste it here.

The same token will be reused for publishing in the final phase, so this is a one-time ask.

Then read what's in the repo:

  • List the repo files (huggingface_hub.HfApi().list_repo_files(repo_id)). Look for .safetensors, README.md, example images/videos, multiple checkpoints.
  • Fetch the model card (huggingface_hub.ModelCard.load(repo_id)). The data dict has structured fields; the text has the README body.

…

Pertanyaan umum

Apa itu LoRA?

LoRA adalah teknik untuk melatih model AI secara lebih efisien, sehingga model bisa mempelajari gaya atau konsep tertentu tanpa perlu melatih ulang seluruh model.

Apa itu Hugging Face Spaces?

Hugging Face Spaces adalah platform tempat Anda bisa menyimpan dan membagikan demo model AI, sehingga orang lain bisa menggunakannya lewat antarmuka web.

Apakah saya perlu bisa coding untuk memakai alat ini?

Tidak perlu. Alat ini dirancang untuk orang yang tidak menulis kode. Anda cukup memberikan nama LoRA Anda.

Detail

Deskripsi asli dari pembuat

Build and publish a Gradio demo on Hugging Face Spaces for a user-provided LoRA.

repo: sickn33/agentic-awesome-skills

Popularitas

Bintang GitHub
48k
Peringkat
#4848
Lisensi
MIT
Diperbarui
15/10/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa