MichaelRKessler commited on
Commit
00e3783
·
1 Parent(s): 17afc32

docs: add Hugging Face LFS push guidance

Browse files
Files changed (2) hide show
  1. AGENTS.md +9 -0
  2. README.md +30 -3
AGENTS.md CHANGED
@@ -14,3 +14,12 @@
14
  - `uv add <package>` — add a dependency
15
  - `uv sync` — install all dependencies from lockfile
16
  - `uv run pytest` — run tests
 
 
 
 
 
 
 
 
 
 
14
  - `uv add <package>` — add a dependency
15
  - `uv sync` — install all dependencies from lockfile
16
  - `uv run pytest` — run tests
17
+
18
+ ## Hugging Face Deployment
19
+
20
+ - `.stl` files must be tracked by Git LFS (`*.stl filter=lfs` in `.gitattributes`)
21
+ - Verify Git LFS is available before push: `git lfs version`
22
+ - Confirm tracked LFS files: `git lfs ls-files`
23
+ - Standard push sequence: `git push origin main` then `git push hf-space main`
24
+ - If Hugging Face rejects binaries, re-check `.gitattributes` and LFS status before retrying
25
+ - `git lfs migrate` rewrites history; only use it intentionally and coordinate with collaborators first
README.md CHANGED
@@ -10,7 +10,7 @@ short_description: Upload an STL and export a TIFF slice.
10
 
11
  # STL to TIFF Gradio App
12
 
13
- This project provides a Gradio app that takes an uploaded STL file, shows an interactive 3D viewer, slices it along the Z axis, saves each slice as a TIFF image, and lets you browse the stack inside the UI.
14
 
15
  ## Run
16
 
@@ -23,8 +23,8 @@ Then open the local Gradio URL in your browser, upload an STL file, and generate
23
 
24
  ## What the app does
25
 
26
- - Uploads a single `.stl` file
27
- - Shows an interactive 3D viewer for rotating the model
28
  - Lets you choose layer height and XY pixel size
29
  - Produces one `.tif` image per slice
30
  - Encodes material as black (`0`) and empty space as white (`255`) in each TIFF slice
@@ -36,3 +36,30 @@ Then open the local Gradio URL in your browser, upload an STL file, and generate
36
  ```powershell
37
  uv run pytest
38
  ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
 
11
  # STL to TIFF Gradio App
12
 
13
+ This project provides a Gradio app that takes up to three uploaded STL files, shows interactive 3D viewers, slices each model along the Z axis, saves slices as TIFF images, and lets you browse each stack inside the UI.
14
 
15
  ## Run
16
 
 
23
 
24
  ## What the app does
25
 
26
+ - Uploads up to three `.stl` files
27
+ - Shows interactive 3D viewers for rotating each model
28
  - Lets you choose layer height and XY pixel size
29
  - Produces one `.tif` image per slice
30
  - Encodes material as black (`0`) and empty space as white (`255`) in each TIFF slice
 
36
  ```powershell
37
  uv run pytest
38
  ```
39
+
40
+ ## Hugging Face Deployment
41
+
42
+ This repository tracks `.stl` files with Git LFS (see `.gitattributes`).
43
+
44
+ Before your first push on a machine:
45
+
46
+ ```powershell
47
+ git lfs install
48
+ git lfs pull
49
+ ```
50
+
51
+ Recommended push flow:
52
+
53
+ ```powershell
54
+ git push origin main
55
+ git push hf-space main
56
+ ```
57
+
58
+ If Hugging Face rejects a push for binary files, verify LFS setup first:
59
+
60
+ ```powershell
61
+ git lfs version
62
+ git lfs ls-files
63
+ ```
64
+
65
+ Warning: `git lfs migrate` rewrites commit history. Use it only when you intentionally want history rewritten and all collaborators are aligned.