agentleFS
Tomas542Tomas542/lightning_hydra_template/.agents/skills/huggingface-space/SKILL.md

huggingface-space

Skill2 starsChanged 5 days agoMITView on GitHub

Creates, tests, and deploys an interactive research results demo (using Gradio or Streamlit) to a Hugging Face Space. Configures metadata frontmatter, handles dependencies, and pushes assets to the Hub.

  • Commits and pushes

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 3 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Every Hugging Face Space requires a YAML frontmatter header inside its root README.md to configure the runtime.

    line 26
  2. Distinctive:

    Ensure a lightweight requirements file or Pixi export is included so the Space builds successfully:

    line 42
  3. Very specific:

    Create requirements.txt listing essential runtime libraries (e.g., gradio, torch, librosa, pandas).

    line 43
  4. Very specific:

    Keep heavy model weights hosted separately on the Hugging Face Model Hub rather than bloating the git repository.

    line 44
  5. Very specific:

    Verify authentication: Ensure the user has logged in via huggingface-cli login or set HF_TOKEN.

    line 47
  6. Distinctive:

    Create the remote Space (if not already created via web interface):

    line 48

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Publish Research Demo to Hugging Face Space

Overview

Deploy interactive model checkpoints, visualization notebooks, or quantitative evaluation results as a live web application on Hugging Face Spaces. This skill standardizes the creation of app.py, README.md metadata (YAML frontmatter), dependency management, and git push workflows to HF Hub.

When to Use

  • Presenting qualitative or quantitative research results from a paper or hackathon project.
  • Sharing an interactive model checkpoint demo.
  • Creating a reproducible web frontend for reviewers or the public.

Execution Workflow

Step 1: Choose Framework & Define UI Scope

Prepare an app with gradio. This is recommended for ML model inference, audio processing demos (using librosa / PyTorch), and interactive sliders.

Step 2: Prepare Space Configuration & Metadata (README.md)

Every Hugging Face Space requires a YAML frontmatter header inside its root README.md to configure the runtime. Create or verify the header:

---
title: "Project Name Demo"
emoji: "🚀"
colorFrom: "blue"
colorTo: "purple"
sdk: "gradio"
sdk_version: "4.40.0"
app_file: "app.py"
pinned: false
license: "mit"
---

Step 3: Bundle Dependencies

Ensure a lightweight requirements file or Pixi export is included so the Space builds successfully:

  • Create requirements.txt listing essential runtime libraries (e.g., gradio, torch, librosa, pandas).
  • Keep heavy model weights hosted separately on the Hugging Face Model Hub rather than bloating the git repository; download them dynamically on startup inside app.py using huggingface_hub.

Step 4: Initialize and Push to Hugging Face

  • Verify authentication: Ensure the user has logged in via huggingface-cli login or set HF_TOKEN.
  • Create the remote Space (if not already created via web interface):
huggingface-cli repo create <space-name> --type space --space_sdk gradio

Clone, link, and push the demo directory:

git remote add hf [https://huggingface.co/spaces/](https://huggingface.co/spaces/)<username>/<space-name>
git push hf main --force

Verification & Output Checklist

[ ] app.py successfully runs locally without missing imports or hardcoded local absolute paths. [ ] README.md contains valid YAML frontmatter matching the chosen SDK (gradio). [ ] requirements.txt or configuration files are present for container build execution. [ ] Live Space URL is verified and functional after pushing. [ ] Space is for CPU basic tier without GPU.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.