agentsclimarketplace

Gradio spaces demo deploy

Skill kjuhwa/skills-hub/skills/llm-agents/gradio-spaces-demo-deploy

Deploy a fine-tuned Transformers model as a Gradio web interface and push it to HuggingFace Spaces.From its SKILL.md

Install
npx -y skills add kjuhwa/skills-hub --skill gradio-spaces-demo-deploy

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

1.6 KB, 273 tokens by cl100k_base, as published. Nobody here has run it

Deploy a Fine-Tuned Model as a Gradio Spaces Demo

When to use

  • You have a fine-tuned model and want a shareable web demo without a dedicated server.
  • Host for free on HuggingFace Spaces using the Gradio SDK.

Steps

  1. Create a new Gradio Space at https://huggingface.co/new-space?sdk=gradio

  2. Write app.py:

import gradio as gr
from transformers import pipeline

classifier = pipeline("text-classification", model="./model")

def predict(text):
    result = classifier(text)[0]
    return result["label"], result["score"]

demo = gr.Interface(fn=predict, inputs="text", outputs=["label", "number"])
demo.launch()
  1. Create requirements.txt with pinned transformers and torch versions.

  2. Upload app.py, requirements.txt, and model files to your Space.

  3. The Space builds and launches automatically.

Example

Reference demo: https://huggingface.co/spaces/cooelf/text-classification

Pitfalls

  • HuggingFace Spaces may require a VPN in China.
  • Large model files may exceed free-tier storage; load model by Hub ID instead.

Source

  • Chapter 1 of dive-into-llms - documents/chapter1/README.md

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 326,144. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.