Skip to content

kbsooo/hf-grass

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

HF Grass Widget

Generate a Hugging Face activity heatmap SVG you can embed in a GitHub README.

Quick start

python3 scripts/hf_grass.py --user YOUR_HF_USERNAME --out assets/hf-grass.svg

To align daily buckets with KST midnight:

python3 scripts/hf_grass.py --user YOUR_HF_USERNAME --out assets/hf-grass.svg --tz-offset 9

Embed in README

![Hugging Face activity](assets/hf-grass.svg)

The SVG is generated; run the script or workflow to create it.

Profile README (minimal)

  1. Fork this repo (or copy the workflow + script into a repo you own).
  2. Set the repo variable HF_USERNAME.
  3. Embed the raw SVG(s) in your GitHub profile README:
![HF activity](https://raw.githubusercontent.com/YOUR_GITHUB_ID/hf-grass/main/assets/hf-grass.svg#gh-light-mode-only)
![HF activity](https://raw.githubusercontent.com/YOUR_GITHUB_ID/hf-grass/main/assets/hf-grass-dark.svg#gh-dark-mode-only)

Example (kbsooo)

Light:

Hugging Face activity for kbsooo (light)

Dark:

Hugging Face activity for kbsooo (dark)

Automation (GitHub Actions)

  1. Set a repository variable named HF_USERNAME.
  2. Run the workflow in .github/workflows/hf-grass.yml (or wait for the schedule).

For public repos, this workflow is free on GitHub-hosted runners.

Notes

  • The generator uses https://huggingface.co/api/recent-activity.
  • Use --activity-type to filter: all, discussion, upvote, or like.
  • Add --show-legend for a Less/More legend.
  • Use --theme to switch palette/background: light (default) or github-dark.
  • Add --plot to save a preview PNG (requires matplotlib).
  • Use --tz-offset to shift daily buckets (e.g., 9 for KST).
  • Days with only upvotes/likes use a red palette.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages