MichaelRKessler commited on
Commit
71c658a
·
1 Parent(s): 5221a6c

Add Codex run config and sample button styling

Browse files
.codex/config.toml ADDED
@@ -0,0 +1 @@
 
 
1
+ sandbox_mode = "workspace-write"
.codex/environments/environment.toml ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # THIS IS AUTOGENERATED. DO NOT EDIT MANUALLY
2
+ version = 1
3
+ name = "STLtoGCode"
4
+
5
+ [setup]
6
+ script = ""
7
+
8
+ [[actions]]
9
+ name = "Run"
10
+ icon = "run"
11
+ command = "uv run gradio app.py"
README.md CHANGED
@@ -19,6 +19,14 @@ uv sync --all-groups
19
  uv run python app.py
20
  ```
21
 
 
 
 
 
 
 
 
 
22
  Then open the local Gradio URL in your browser, upload an STL file, and generate the TIFF stack.
23
 
24
  ## What the app does
 
19
  uv run python app.py
20
  ```
21
 
22
+ For reload mode during development, run:
23
+
24
+ ```powershell
25
+ uv run gradio app.py
26
+ ```
27
+
28
+ When `app.py` changes, Gradio will automatically rerun the file and refresh the demo.
29
+
30
  Then open the local Gradio URL in your browser, upload an STL file, and generate the TIFF stack.
31
 
32
  ## What the app does
app.py CHANGED
@@ -63,6 +63,24 @@ APP_CSS = """
63
  cursor: pointer !important;
64
  opacity: 1 !important;
65
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
66
  """
67
 
68
  # Gradio 6.10's gr.Model3D leaves the Undo (reset view) button permanently
@@ -868,6 +886,7 @@ def build_demo() -> gr.Blocks:
868
  size="sm",
869
  min_width=140,
870
  scale=0,
 
871
  )
872
  with gr.Column(scale=0, min_width=240):
873
  model_opacity = gr.Checkbox(
 
63
  cursor: pointer !important;
64
  opacity: 1 !important;
65
  }
66
+
67
+ #load-sample-stls-button,
68
+ #load-sample-stls-button button {
69
+ background: #f97316 !important;
70
+ border-color: #ea580c !important;
71
+ color: #ffffff !important;
72
+ }
73
+
74
+ #load-sample-stls-button:hover,
75
+ #load-sample-stls-button button:hover {
76
+ background: #ea580c !important;
77
+ border-color: #c2410c !important;
78
+ }
79
+
80
+ #load-sample-stls-button:focus-visible,
81
+ #load-sample-stls-button button:focus-visible {
82
+ box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.35) !important;
83
+ }
84
  """
85
 
86
  # Gradio 6.10's gr.Model3D leaves the Undo (reset view) button permanently
 
886
  size="sm",
887
  min_width=140,
888
  scale=0,
889
+ elem_id="load-sample-stls-button",
890
  )
891
  with gr.Column(scale=0, min_width=240):
892
  model_opacity = gr.Checkbox(