You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: upgrade all Spaces to hyperview==0.3.1 from PyPI, remove vendoring
- Imagenette: bump from hyperview==0.2.0 to 0.3.1, simplify demo.py
- Jaguar Re-ID: replace vendored source with hyperview[ml]==0.3.1
(timm-image provider and spherical 3D layout now in released package)
- Add Jaguar deploy workflow with pypi-release dispatch trigger
- Update READMEs: remove vendoring references, document community reuse flow
- Both demos verified locally against isolated PyPI installs
- Reuse one template pattern for multiple Space demos
13
13
- Deploy each demo folder to a different Hugging Face Space via GitHub Actions
14
14
15
+
## Intended reuse flow
16
+
17
+
This repo is meant to be easy to hand to an external coding agent.
18
+
19
+
The happy path is:
20
+
21
+
1. Copy one folder from `spaces/`
22
+
2. Edit the constants block at the top of that folder's `demo.py`
23
+
3. Update the Space `README.md`
24
+
4. Add or retarget one deploy workflow
25
+
26
+
Both official examples install released packages from PyPI. Keep custom Space
27
+
logic in `demo.py` and Space-local files so contributors can copy a folder,
28
+
change their dataset settings, and open a PR without carrying an internal
29
+
source snapshot.
30
+
31
+
The current Imagenette example is intentionally simple and keeps the editable
32
+
dataset/model choices in one place so agents do not need to coordinate Docker
33
+
args, runtime environment variables, and Python script flags.
34
+
35
+
## Create Your Own Hugging Face Space
36
+
37
+
Use the Imagenette example as a copyable starter.
38
+
39
+
1. Create a new Space at https://huggingface.co/new-space.
40
+
2. Choose a distinct Space name such as `yourproject-HyperView` or `HyperView-yourproject`.
41
+
3. Select `Docker` as the Space SDK.
42
+
4. Create the Space. Hugging Face will initialize it as a git-backed Docker Space with `sdk: docker` in `README.md`.
43
+
5. In this repository, copy `spaces/imagenette-clip-hycoclip` to a new folder such as `spaces/yourproject-hyperview`.
44
+
6. Edit `spaces/yourproject-hyperview/demo.py` and change the constants block at the top of the file.
45
+
7. Edit `spaces/yourproject-hyperview/README.md` and rename the copied example from `HyperView` to your own project name.
46
+
8. Keep the Space name consistent across the Hugging Face Space ID, the README frontmatter `title`, and the Markdown H1. Good patterns are `yourproject-HyperView` and `HyperView-yourproject`.
47
+
9. Copy `.github/workflows/deploy-hf-space-imagenette.yml` to a new workflow file and update `name`, `concurrency`, `paths`, `source_dir`, and `space_id`.
48
+
10. Configure the GitHub Actions secrets `HF_USERNAME` and `HF_TOKEN`. The token must have write access to the target Hugging Face Space.
49
+
11. Push to `main` or run the workflow manually with `workflow_dispatch`.
50
+
12. Keep the Dockerfile on released PyPI packages such as `hyperview==0.3.1` or `hyperview[ml]==0.3.1` instead of vendoring `hyperview` into the Space folder.
51
+
13. Check the Hugging Face Space logs to confirm the Docker image built and the container started on port `7860`.
docker run --rm -p 7860:7860 yourproject-hyperview
60
+
```
61
+
62
+
Then open `http://127.0.0.1:7860`.
63
+
64
+
## Contribute Your Space Back
65
+
66
+
If you want your Space to appear in this repository as a community example:
67
+
68
+
1. Fork this repository or create a branch if you already have write access.
69
+
2. Add your Space folder under `spaces/<your-slug>`.
70
+
3. Rename the copied `HyperView` title and heading to your own project name such as `yourproject-HyperView` or `HyperView-yourproject`.
71
+
4. Add or update a deploy workflow for your folder if this repository should deploy it.
72
+
5. Add a row for your Space in the community table below.
73
+
6. 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.
74
+
75
+
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.
76
+
77
+
## Community Contributed Spaces
78
+
79
+
Add one row here when you contribute a new Space.
80
+
81
+
| Space | Hugging Face Space ID | Folder | Maintainer | Status | Notes |
82
+
| --- | --- | --- | --- | --- | --- |
83
+
| HyperView - Imagenette |`hyper3labs/HyperView`|`spaces/imagenette-clip-hycoclip`| Hyper3Labs | Official example | Copyable starter template |
84
+
| 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]`|
Copy file name to clipboardExpand all lines: spaces/README.md
+57-4Lines changed: 57 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,10 +16,53 @@ spaces/
16
16
Dockerfile
17
17
.dockerignore
18
18
demo.py
19
+
jaguar-reid-megadescriptor-spherical/
20
+
README.md
21
+
Dockerfile
22
+
.dockerignore
23
+
demo.py
19
24
```
20
25
21
26
Each subfolder is a **Space root** (must contain at least `README.md` + `Dockerfile`).
22
27
28
+
## Agent-friendly pattern
29
+
30
+
The example folders are meant to be easy for external coding agents to edit.
31
+
The intended workflow is:
32
+
33
+
1. Copy `spaces/imagenette-clip-hycoclip` to a new slug.
34
+
2. Edit the constants block at the top of the new `demo.py`.
35
+
3. Update the new folder's `README.md` frontmatter and title.
36
+
4. Copy and retarget the matching deploy workflow.
37
+
38
+
The template deliberately avoids environment-variable configuration inside
39
+
`demo.py` so agents only need one obvious edit surface.
40
+
41
+
Both official examples install released PyPI packages. Keep Space-specific code
42
+
inside the copied folder and update the pinned HyperView version after a PyPI
43
+
release instead of vendoring `hyperview` into the Space.
44
+
45
+
## Exact Steps
46
+
47
+
1. Create a new Hugging Face Space at https://huggingface.co/new-space.
48
+
2. Name it something distinct like `yourproject-HyperView` or `HyperView-yourproject`.
49
+
3. Choose `Docker` as the SDK.
50
+
4. Copy `spaces/imagenette-clip-hycoclip` to `spaces/yourproject-hyperview`.
51
+
5. Edit the constants block in `spaces/yourproject-hyperview/demo.py`.
52
+
6. Edit `spaces/yourproject-hyperview/README.md` and rename the copied `HyperView` title and H1 to your own project name.
53
+
7. Copy `.github/workflows/deploy-hf-space-imagenette.yml` to a new workflow file and update `space_id`, `source_dir`, `paths`, `name`, and `concurrency`.
54
+
8. Make sure the GitHub Actions secrets `HF_USERNAME` and `HF_TOKEN` can push to your target Space.
55
+
9. Keep the Dockerfile on released packages such as `hyperview==0.3.1` or `hyperview[ml]==0.3.1`.
56
+
10. Push to `main` or trigger `workflow_dispatch`.
0 commit comments