luh1124 commited on
Commit
1ec3c4e
Β·
1 Parent(s): 01e9870

docs: clarify Space app_file vs dashboard; fix README structure bullets

Browse files
Files changed (2) hide show
  1. DEPLOY_HF_SPACE.md +4 -2
  2. README.md +4 -3
DEPLOY_HF_SPACE.md CHANGED
@@ -133,10 +133,12 @@ If the UI shows **no examples** or **`No PNG examples`**, usually:
133
 
134
  | File | Role |
135
  |------|------|
136
- | `README.md` | Must start with YAML frontmatter (`sdk: gradio`, `app_file: app.py`, `sdk_version`, …). |
137
  | `app.py` | Full NeAR entry point; uses `PORT` / `GRADIO_SERVER_*` env vars. |
138
  | `app_hyshape.py` | Optional HyShape-only diagnostic entry (see repo README). |
139
- | `app_gsplat.py` | Optional gsplat-only raster probe (same RGB+ED layout as `app.py` warmup). |
 
 
140
  | `requirements.txt` | `pip` dependencies. |
141
  | `packages.txt` | Optional `apt` packages (OpenGL, etc.). |
142
 
 
133
 
134
  | File | Role |
135
  |------|------|
136
+ | `README.md` | Must start with YAML frontmatter (`sdk: gradio`, `app_file: …`, `sdk_version`, …). The **`app_file`** value is what Spaces should launch after each build. |
137
  | `app.py` | Full NeAR entry point; uses `PORT` / `GRADIO_SERVER_*` env vars. |
138
  | `app_hyshape.py` | Optional HyShape-only diagnostic entry (see repo README). |
139
+ | `app_gsplat.py` | Optional gsplat image-fitting Gradio demo (`@spaces.GPU`). |
140
+
141
+ If the running Space does not match `README.md` **`app_file`**, check **Space β†’ Settings β†’ App file** (dashboard can disagree until you align it) and **Restart** the Space. Use the **spaces** URL (`/spaces/<user>/<name>`), not the model repo URL.
142
  | `requirements.txt` | `pip` dependencies. |
143
  | `packages.txt` | Optional `apt` packages (OpenGL, etc.). |
144
 
README.md CHANGED
@@ -48,7 +48,8 @@ This repository combines:
48
 
49
  ## ZeroGPU Runtime Notes
50
 
51
- - The Space **`app_file`** in the YAML header above is **`app.py`** (full NeAR app). Switch to **`app_gsplat.py`** or **`app_hyshape.py`** for isolated diagnostics.
 
52
  - **`app_hyshape.py`** (when used as entry): defaults to **`NEAR_HYSHAPE_GEOMETRY_CPU_PRELOAD_AT_START=1`** β€” background **CPU** Hunyuan load at start; **Generate Mesh** pays **GPU move + inference** in `@spaces.GPU`.
53
  - The full `app.py` Space keeps **page-load image defaults** and **HDRI preview** on lightweight CPU paths so the first page visit does not spend the first ZeroGPU allocation on model initialization.
54
  - **`app.py`**: optional background **CPU** preload of Hunyuan + NeAR (`NEAR_MODEL_CPU_PRELOAD_AT_START`); **`@spaces.GPU`** callbacks move each pipeline to CUDA once, then run inference. **gsplat** is used when the pipeline renders (no separate app-level warmup pass).
@@ -102,8 +103,8 @@ Compared with a standard image-to-3D pipeline, NeAR focuses on:
102
  Key files and directories:
103
 
104
  - `example.py` β€” minimal end-to-end inference example.
105
- - `app.py` β€” full NeAR Gradio app; default **`app_file`** for the Hugging Face Space (see README YAML header).
106
- - `app_gsplat.py` β€” **gsplat-only** ZeroGPU probe; set `app_file: app_gsplat.py` to test rasterization in isolation.
107
  - `app_hyshape.py` β€” HyShape-only diagnostic; set `app_file: app_hyshape.py` for Hunyuan geometry in isolation.
108
  - `setup.sh` β€” environment setup helper.
109
  - `checkpoints/` β€” local pipeline configuration and model checkpoints.
 
48
 
49
  ## ZeroGPU Runtime Notes
50
 
51
+ - The Space entry script is **`app_file`** in the YAML header at the very top of this README (currently **`app_gsplat.py`**). Use **`app.py`** for the full NeAR app or **`app_hyshape.py`** for HyShape-only diagnostics.
52
+ - **Space still runs the old entry?** (1) Open the **Space** URL: [huggingface.co/spaces/luh0502/NeAR](https://huggingface.co/spaces/luh0502/NeAR) (not `huggingface.co/luh0502/NeAR`, which is the model repo). (2) In **Space Settings β†’ App file**, ensure it matches the README (the dashboard can override or lag). (3) **Restart** the Space (or trigger a new build) after pushing.
53
  - **`app_hyshape.py`** (when used as entry): defaults to **`NEAR_HYSHAPE_GEOMETRY_CPU_PRELOAD_AT_START=1`** β€” background **CPU** Hunyuan load at start; **Generate Mesh** pays **GPU move + inference** in `@spaces.GPU`.
54
  - The full `app.py` Space keeps **page-load image defaults** and **HDRI preview** on lightweight CPU paths so the first page visit does not spend the first ZeroGPU allocation on model initialization.
55
  - **`app.py`**: optional background **CPU** preload of Hunyuan + NeAR (`NEAR_MODEL_CPU_PRELOAD_AT_START`); **`@spaces.GPU`** callbacks move each pipeline to CUDA once, then run inference. **gsplat** is used when the pipeline renders (no separate app-level warmup pass).
 
103
  Key files and directories:
104
 
105
  - `example.py` β€” minimal end-to-end inference example.
106
+ - `app.py` β€” full NeAR Gradio app; set **`app_file: app.py`** in the README YAML header to run it on the Space.
107
+ - `app_gsplat.py` β€” gsplat **image-fitting** Gradio demo (ZeroGPU); README YAML **`app_file`** is set to this when you want this entry (see top of file).
108
  - `app_hyshape.py` β€” HyShape-only diagnostic; set `app_file: app_hyshape.py` for Hunyuan geometry in isolation.
109
  - `setup.sh` β€” environment setup helper.
110
  - `checkpoints/` β€” local pipeline configuration and model checkpoints.