This folder is intended to be a standalone repository for Hugging Face Space deployments. Our demo at https://huggingface.co/spaces/hyper3labs/HyperView follows the template described here.
Recommended GitHub repository name:
hyperview-spaces
- Keep Space deployment logic separate from the core HyperView codebase
- Reuse one template pattern for multiple Space demos
- Deploy each demo folder to a different Hugging Face Space via GitHub Actions
This repo is meant to be easy to hand to an external coding agent.
The happy path is:
- Copy one folder from
spaces/ - Edit the constants block at the top of that folder's
demo.py - Update the Space
README.md - Add or retarget one deploy workflow
Both official examples install released packages from PyPI. Keep custom Space
logic in demo.py and Space-local files so contributors can copy a folder,
change their dataset settings, and open a PR without carrying an internal
source snapshot.
The current Imagenette example is intentionally simple and keeps the editable dataset/model choices in one place so agents do not need to coordinate Docker args, runtime environment variables, and Python script flags.
Use the Imagenette example as a copyable starter.
- Create a new Space at https://huggingface.co/new-space.
- Choose a distinct Space name such as
yourproject-HyperVieworHyperView-yourproject. - Select
Dockeras the Space SDK. - Create the Space. Hugging Face will initialize it as a git-backed Docker Space with
sdk: dockerinREADME.md. - In this repository, copy
spaces/imagenette-clip-hycoclipto a new folder such asspaces/yourproject-hyperview. - Edit
spaces/yourproject-hyperview/demo.pyand change the constants block at the top of the file. - Edit
spaces/yourproject-hyperview/README.mdand rename the copied example fromHyperViewto your own project name. - Keep the Space name consistent across the Hugging Face Space ID, the README frontmatter
title, and the Markdown H1. Good patterns areyourproject-HyperViewandHyperView-yourproject. - Copy
.github/workflows/deploy-hf-space-imagenette.ymlto a new workflow file and updatename,concurrency,paths,source_dir, andspace_id. - Configure the GitHub Actions secrets
HF_USERNAMEandHF_TOKEN. The token must have write access to the target Hugging Face Space. - Push to
mainor run the workflow manually withworkflow_dispatch. - Keep the Dockerfile on released PyPI packages such as
hyperview==0.3.1orhyperview[ml]==0.3.1instead of vendoringhyperviewinto the Space folder. - Check the Hugging Face Space logs to confirm the Docker image built and the container started on port
7860.
From the hyperview-spaces repository root:
docker build -t yourproject-hyperview spaces/yourproject-hyperview
docker run --rm -p 7860:7860 yourproject-hyperviewThen open http://127.0.0.1:7860.
If you want your Space to appear in this repository as a community example:
- Fork this repository or create a branch if you already have write access.
- Add your Space folder under
spaces/<your-slug>. - Rename the copied
HyperViewtitle and heading to your own project name such asyourproject-HyperVieworHyperView-yourproject. - Add or update a deploy workflow for your folder if this repository should deploy it.
- Add a row for your Space in the community table below.
- Open a pull request describing the Hugging Face Space ID, dataset source, embedding models, and whether the deploy workflow is expected to run from this repository.
Important: deployment workflows in this repository use the shared HF_USERNAME and HF_TOKEN GitHub secrets. A contributed workflow will only deploy successfully if that token has write access to the target Space.
Add one row here when you contribute a new Space.
| Space | Hugging Face Space ID | Folder | Maintainer | Status | Notes |
|---|---|---|---|---|---|
| HyperView - Imagenette | hyper3labs/HyperView |
spaces/imagenette-clip-hycoclip |
Hyper3Labs | Official example | Copyable starter template |
| HyperView - Jaguar Re-ID | hyper3labs/HyperView-Jaguar-ReID |
spaces/jaguar-reid-megadescriptor-spherical |
Hyper3Labs | Official example | Advanced timm-image + spherical example using released hyperview[ml] |
.
├── .github/workflows/
├── spaces/
│ ├── README.md
│ ├── jaguar-reid-megadescriptor-spherical/
│ │ ├── README.md
│ │ ├── Dockerfile
│ │ ├── .dockerignore
│ │ └── demo.py
│ └── imagenette-clip-hycoclip/
│ ├── README.md
│ ├── Dockerfile
│ ├── .dockerignore
│ └── demo.py
└── .gitignore
Yes, you can ship precomputed LanceDB artifacts with the image. There are two valid options:
- Build-time precompute (current default)
RUN python -c "from demo import build_dataset; build_dataset()"- Artifacts are baked into the Docker image layers
- Commit precomputed artifacts into this repo
- Useful when startup determinism is critical
- Usually requires careful size control (and potentially Git LFS)
For now, this repo uses option 1.