Spaces:
Runtime error
Runtime error
deploy: update Space from deploy_preflight --push
Browse files- .codeboarding/logs/wrapper-server.log +46 -0
- app.py +19 -18
- core/llm_zerogpu_lora.py +2 -2
- core/nodes.py +2 -2
- core/theme.py +37 -26
- learn/finetune/gguf_pipeline_modal.py +1 -1
.codeboarding/logs/wrapper-server.log
CHANGED
|
@@ -163,3 +163,49 @@ INFO: 127.0.0.1:44498 - "GET /health HTTP/1.1" 200 OK
|
|
| 163 |
[stderr] 2026-06-14 05:49:36 INFO [watchfiles.main:308] 1 change detected
|
| 164 |
[stderr] 2026-06-14 05:49:37 WARNING [codeboarding_pro.analysis_controller:506] Skipping incremental update: full analysis artifacts not ready yet
|
| 165 |
[stderr] 2026-06-14 05:49:37 INFO [codeboarding_pro.analysis_controller:314] No cached analysis results; skipping health report
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 163 |
[stderr] 2026-06-14 05:49:36 INFO [watchfiles.main:308] 1 change detected
|
| 164 |
[stderr] 2026-06-14 05:49:37 WARNING [codeboarding_pro.analysis_controller:506] Skipping incremental update: full analysis artifacts not ready yet
|
| 165 |
[stderr] 2026-06-14 05:49:37 INFO [codeboarding_pro.analysis_controller:314] No cached analysis results; skipping health report
|
| 166 |
+
[stderr] 2026-06-14 05:51:40 INFO [watchfiles.main:308] 1 change detected
|
| 167 |
+
[stderr] 2026-06-14 05:51:40 WARNING [codeboarding_pro.analysis_controller:506] Skipping incremental update: full analysis artifacts not ready yet
|
| 168 |
+
[stderr] 2026-06-14 05:51:40 INFO [codeboarding_pro.analysis_controller:314] No cached analysis results; skipping health report
|
| 169 |
+
[stderr] 2026-06-14 05:52:21 INFO [watchfiles.main:308] 1 change detected
|
| 170 |
+
[stderr] 2026-06-14 05:52:21 WARNING [codeboarding_pro.analysis_controller:506] Skipping incremental update: full analysis artifacts not ready yet
|
| 171 |
+
[stderr] 2026-06-14 05:52:21 INFO [codeboarding_pro.analysis_controller:314] No cached analysis results; skipping health report
|
| 172 |
+
[stderr] 2026-06-14 05:52:48 INFO [watchfiles.main:308] 1 change detected
|
| 173 |
+
[stderr] 2026-06-14 05:52:49 WARNING [codeboarding_pro.analysis_controller:506] Skipping incremental update: full analysis artifacts not ready yet
|
| 174 |
+
[stderr] 2026-06-14 05:52:49 INFO [codeboarding_pro.analysis_controller:314] No cached analysis results; skipping health report
|
| 175 |
+
[stderr] 2026-06-14 05:53:10 INFO [watchfiles.main:308] 1 change detected
|
| 176 |
+
[stderr] 2026-06-14 05:53:11 WARNING [codeboarding_pro.analysis_controller:506] Skipping incremental update: full analysis artifacts not ready yet
|
| 177 |
+
[stderr] 2026-06-14 05:53:11 INFO [codeboarding_pro.analysis_controller:314] No cached analysis results; skipping health report
|
| 178 |
+
[stderr] 2026-06-14 05:53:35 INFO [watchfiles.main:308] 1 change detected
|
| 179 |
+
[stderr] 2026-06-14 05:53:36 WARNING [codeboarding_pro.analysis_controller:506] Skipping incremental update: full analysis artifacts not ready yet
|
| 180 |
+
[stderr] 2026-06-14 05:53:36 INFO [codeboarding_pro.analysis_controller:314] No cached analysis results; skipping health report
|
| 181 |
+
[stderr] 2026-06-14 05:55:56 INFO [watchfiles.main:308] 1 change detected
|
| 182 |
+
[stderr] 2026-06-14 05:55:57 WARNING [codeboarding_pro.analysis_controller:506] Skipping incremental update: full analysis artifacts not ready yet
|
| 183 |
+
[stderr] 2026-06-14 05:55:57 INFO [codeboarding_pro.analysis_controller:314] No cached analysis results; skipping health report
|
| 184 |
+
[stderr] 2026-06-14 05:56:10 INFO [watchfiles.main:308] 1 change detected
|
| 185 |
+
[stderr] 2026-06-14 05:56:10 WARNING [codeboarding_pro.analysis_controller:506] Skipping incremental update: full analysis artifacts not ready yet
|
| 186 |
+
[stderr] 2026-06-14 05:56:10 INFO [codeboarding_pro.analysis_controller:314] No cached analysis results; skipping health report
|
| 187 |
+
[stderr] 2026-06-14 05:56:26 INFO [watchfiles.main:308] 1 change detected
|
| 188 |
+
[stderr] 2026-06-14 05:56:27 WARNING [codeboarding_pro.analysis_controller:506] Skipping incremental update: full analysis artifacts not ready yet
|
| 189 |
+
[stderr] 2026-06-14 05:56:27 INFO [codeboarding_pro.analysis_controller:314] No cached analysis results; skipping health report
|
| 190 |
+
[stderr] 2026-06-14 05:57:02 INFO [watchfiles.main:308] 1 change detected
|
| 191 |
+
[stderr] 2026-06-14 05:57:02 WARNING [codeboarding_pro.analysis_controller:506] Skipping incremental update: full analysis artifacts not ready yet
|
| 192 |
+
[stderr] 2026-06-14 05:57:02 INFO [codeboarding_pro.analysis_controller:314] No cached analysis results; skipping health report
|
| 193 |
+
[stderr] 2026-06-14 05:57:39 INFO [watchfiles.main:308] 4 changes detected
|
| 194 |
+
[stderr] 2026-06-14 05:57:39 WARNING [codeboarding_pro.analysis_controller:506] Skipping incremental update: full analysis artifacts not ready yet
|
| 195 |
+
[stderr] 2026-06-14 05:57:39 INFO [codeboarding_pro.analysis_controller:314] No cached analysis results; skipping health report
|
| 196 |
+
[stderr] 2026-06-14 05:58:03 INFO [watchfiles.main:308] 4 changes detected
|
| 197 |
+
[stderr] 2026-06-14 05:58:03 INFO [watchfiles.main:308] 1 change detected
|
| 198 |
+
[stderr] 2026-06-14 05:58:04 WARNING [codeboarding_pro.analysis_controller:506] Skipping incremental update: full analysis artifacts not ready yet
|
| 199 |
+
[stderr] 2026-06-14 05:58:04 INFO [codeboarding_pro.analysis_controller:314] No cached analysis results; skipping health report
|
| 200 |
+
[stderr] 2026-06-14 06:00:27 INFO [watchfiles.main:308] 1 change detected
|
| 201 |
+
[stderr] 2026-06-14 06:00:27 WARNING [codeboarding_pro.analysis_controller:506] Skipping incremental update: full analysis artifacts not ready yet
|
| 202 |
+
[stderr] 2026-06-14 06:00:27 INFO [codeboarding_pro.analysis_controller:314] No cached analysis results; skipping health report
|
| 203 |
+
[stderr] 2026-06-14 06:02:36 INFO [watchfiles.main:308] 1 change detected
|
| 204 |
+
[stderr] 2026-06-14 06:02:36 WARNING [codeboarding_pro.analysis_controller:506] Skipping incremental update: full analysis artifacts not ready yet
|
| 205 |
+
[stderr] 2026-06-14 06:02:36 INFO [codeboarding_pro.analysis_controller:314] No cached analysis results; skipping health report
|
| 206 |
+
[stderr] 2026-06-14 06:02:47 INFO [watchfiles.main:308] 1 change detected
|
| 207 |
+
[stderr] 2026-06-14 06:02:48 WARNING [codeboarding_pro.analysis_controller:506] Skipping incremental update: full analysis artifacts not ready yet
|
| 208 |
+
[stderr] 2026-06-14 06:02:48 INFO [codeboarding_pro.analysis_controller:314] No cached analysis results; skipping health report
|
| 209 |
+
[stderr] 2026-06-14 06:03:06 INFO [watchfiles.main:308] 1 change detected
|
| 210 |
+
[stderr] 2026-06-14 06:03:06 WARNING [codeboarding_pro.analysis_controller:506] Skipping incremental update: full analysis artifacts not ready yet
|
| 211 |
+
[stderr] 2026-06-14 06:03:06 INFO [codeboarding_pro.analysis_controller:314] No cached analysis results; skipping health report
|
app.py
CHANGED
|
@@ -546,7 +546,8 @@ def launch(**kw):
|
|
| 546 |
|
| 547 |
def _action_bar(reset_btn_label="RESET", primary_label=None, primary_variant="primary",
|
| 548 |
primary_id=None):
|
| 549 |
-
"""Build the consistent top-right action bar (small primary + persistent Reset).
|
|
|
|
| 550 |
with gr.Row(elem_classes=["ce-actionbar"]):
|
| 551 |
reset = gr.Button(reset_btn_label, elem_classes=["ce-pillbtn", "ce-act"], scale=0)
|
| 552 |
primary = None
|
|
@@ -566,14 +567,13 @@ def _reset_outputs(ledger_panel, node_cards, review_summary, p_curve, p_policy,
|
|
| 566 |
def build() -> gr.Blocks:
|
| 567 |
with gr.Blocks(title="Microfactory Node: 3D Printer") as demo:
|
| 568 |
gr.HTML(command_bar(llm.backend_status()))
|
| 569 |
-
# header row:
|
| 570 |
with gr.Row(elem_id="ce-modelswitch"):
|
| 571 |
model_select = gr.Dropdown(MODEL_OPTIONS, value=MODEL_OPTIONS[0],
|
| 572 |
show_label=False, container=False,
|
| 573 |
elem_classes=["ce-modeldd"], scale=0)
|
| 574 |
-
gr.
|
| 575 |
-
|
| 576 |
-
model_status = gr.HTML(_status_html())
|
| 577 |
|
| 578 |
state = gr.State()
|
| 579 |
part = gr.State({"geometry": None, "mesh": None, "label": None, "read": None})
|
|
@@ -588,28 +588,29 @@ def build() -> gr.Blocks:
|
|
| 588 |
"this is."))
|
| 589 |
studio_log = gr.HTML(studio_log_html())
|
| 590 |
|
| 591 |
-
# environment band β readout |
|
| 592 |
-
with gr.Row(equal_height=
|
| 593 |
-
with gr.Column(scale=2, min_width=200
|
| 594 |
gr.HTML(rule("ENVIRONMENT (SIMULATED)"))
|
| 595 |
sensors_readout = gr.HTML()
|
| 596 |
-
roll_btn = gr.Button("
|
| 597 |
-
with gr.Column(scale=
|
| 598 |
gr.HTML(rule("OVERRIDE ENVIRONMENT"))
|
| 599 |
with gr.Row():
|
| 600 |
-
temp = gr.Number(value=22, label="AMBIENT Β°C", elem_classes=["ce-num"])
|
| 601 |
-
humidity = gr.Number(value=45, label="HUMIDITY %RH", elem_classes=["ce-num"])
|
| 602 |
-
gr.HTML("<div class='ce-sub'>BUILD-PLATE POSITION β
|
| 603 |
-
"β warp/adhesion risk</div>")
|
| 604 |
bed_position = gr.Radio(BED_POSITIONS, value="center", show_label=False,
|
| 605 |
elem_classes=["ce-pills"])
|
| 606 |
description = gr.Textbox(label="NOTES (OPTIONAL)",
|
| 607 |
placeholder="e.g. 45Β° bracket, 60mm tall")
|
| 608 |
-
with gr.Column(scale=
|
| 609 |
gr.HTML(rule("MATERIAL"))
|
| 610 |
material = gr.Radio(MATERIALS, value="PLA", show_label=False, elem_classes=["ce-pills"])
|
|
|
|
| 611 |
|
| 612 |
-
with gr.Group(
|
| 613 |
gr.HTML(rule("PART"))
|
| 614 |
part_status = gr.Markdown("", elem_classes=["ce-pad"])
|
| 615 |
with gr.Row():
|
|
@@ -617,14 +618,14 @@ def build() -> gr.Blocks:
|
|
| 617 |
part_placeholder = gr.HTML(_viewer_placeholder())
|
| 618 |
model3d = gr.Model3D(value=None, label="", height=360, visible=False)
|
| 619 |
with gr.Column(scale=1):
|
| 620 |
-
benchy_btn = gr.Button("QUICK-LOAD BENCHY", elem_classes=["ce-pillbtn"])
|
| 621 |
mesh_in = gr.File(file_types=[".stl", ".glb", ".obj"],
|
| 622 |
label="UPLOAD MESH", elem_classes=["ce-drop"])
|
| 623 |
with gr.Accordion("GENERATE A PRIMITIVE", open=False):
|
| 624 |
gen_kind = gr.Radio(["box", "cylinder", "cone", "sphere"], value="box",
|
| 625 |
show_label=False, elem_classes=["ce-pills"])
|
| 626 |
gen_size = gr.Number(value=30, label="SIZE (mm)", elem_classes=["ce-num"])
|
| 627 |
-
gen_btn = gr.Button("GENERATE", elem_classes=["ce-pillbtn"])
|
| 628 |
|
| 629 |
# βββββββββββββββββ SLICE Β· slice + analyze + pre-flight check βββββββββββββ
|
| 630 |
with gr.Tab("SLICE", id="build"):
|
|
|
|
| 546 |
|
| 547 |
def _action_bar(reset_btn_label="RESET", primary_label=None, primary_variant="primary",
|
| 548 |
primary_id=None):
|
| 549 |
+
"""Build the consistent top-right action bar (small primary + persistent Reset).
|
| 550 |
+
Both buttons are scale=0 so they DON'T stretch full-width."""
|
| 551 |
with gr.Row(elem_classes=["ce-actionbar"]):
|
| 552 |
reset = gr.Button(reset_btn_label, elem_classes=["ce-pillbtn", "ce-act"], scale=0)
|
| 553 |
primary = None
|
|
|
|
| 567 |
def build() -> gr.Blocks:
|
| 568 |
with gr.Blocks(title="Microfactory Node: 3D Printer") as demo:
|
| 569 |
gr.HTML(command_bar(llm.backend_status()))
|
| 570 |
+
# header row: dropdown + warm button only (NO background tints, NO stretching)
|
| 571 |
with gr.Row(elem_id="ce-modelswitch"):
|
| 572 |
model_select = gr.Dropdown(MODEL_OPTIONS, value=MODEL_OPTIONS[0],
|
| 573 |
show_label=False, container=False,
|
| 574 |
elem_classes=["ce-modeldd"], scale=0)
|
| 575 |
+
warm_btn = gr.Button(icon("bolt", 12) + " WARM UP", elem_classes=["ce-pillbtn"], scale=0)
|
| 576 |
+
model_status = gr.HTML(_status_html(), elem_classes=["ce-status-inline"])
|
|
|
|
| 577 |
|
| 578 |
state = gr.State()
|
| 579 |
part = gr.State({"geometry": None, "mesh": None, "label": None, "read": None})
|
|
|
|
| 588 |
"this is."))
|
| 589 |
studio_log = gr.HTML(studio_log_html())
|
| 590 |
|
| 591 |
+
# environment band β readout | override (inline) | material
|
| 592 |
+
with gr.Row(equal_height=False):
|
| 593 |
+
with gr.Column(scale=2, min_width=200):
|
| 594 |
gr.HTML(rule("ENVIRONMENT (SIMULATED)"))
|
| 595 |
sensors_readout = gr.HTML()
|
| 596 |
+
roll_btn = gr.Button(icon("shuffle", 12) + " RANDOMIZE", elem_classes=["ce-pillbtn"], scale=0)
|
| 597 |
+
with gr.Column(scale=3, min_width=320):
|
| 598 |
gr.HTML(rule("OVERRIDE ENVIRONMENT"))
|
| 599 |
with gr.Row():
|
| 600 |
+
temp = gr.Number(value=22, label="AMBIENT Β°C", elem_classes=["ce-num"], scale=1)
|
| 601 |
+
humidity = gr.Number(value=45, label="HUMIDITY %RH", elem_classes=["ce-num"], scale=1)
|
| 602 |
+
gr.HTML("<div class='ce-sub' style='margin:4px 0 2px;'>BUILD-PLATE POSITION β "
|
| 603 |
+
"edges/corners run cooler β warp/adhesion risk</div>")
|
| 604 |
bed_position = gr.Radio(BED_POSITIONS, value="center", show_label=False,
|
| 605 |
elem_classes=["ce-pills"])
|
| 606 |
description = gr.Textbox(label="NOTES (OPTIONAL)",
|
| 607 |
placeholder="e.g. 45Β° bracket, 60mm tall")
|
| 608 |
+
with gr.Column(scale=1, min_width=180):
|
| 609 |
gr.HTML(rule("MATERIAL"))
|
| 610 |
material = gr.Radio(MATERIALS, value="PLA", show_label=False, elem_classes=["ce-pills"])
|
| 611 |
+
gr.HTML(_model_callout()) # info callout lives in the material column now
|
| 612 |
|
| 613 |
+
with gr.Group():
|
| 614 |
gr.HTML(rule("PART"))
|
| 615 |
part_status = gr.Markdown("", elem_classes=["ce-pad"])
|
| 616 |
with gr.Row():
|
|
|
|
| 618 |
part_placeholder = gr.HTML(_viewer_placeholder())
|
| 619 |
model3d = gr.Model3D(value=None, label="", height=360, visible=False)
|
| 620 |
with gr.Column(scale=1):
|
| 621 |
+
benchy_btn = gr.Button(icon("anchor", 12) + " QUICK-LOAD BENCHY", elem_classes=["ce-pillbtn"], scale=0)
|
| 622 |
mesh_in = gr.File(file_types=[".stl", ".glb", ".obj"],
|
| 623 |
label="UPLOAD MESH", elem_classes=["ce-drop"])
|
| 624 |
with gr.Accordion("GENERATE A PRIMITIVE", open=False):
|
| 625 |
gen_kind = gr.Radio(["box", "cylinder", "cone", "sphere"], value="box",
|
| 626 |
show_label=False, elem_classes=["ce-pills"])
|
| 627 |
gen_size = gr.Number(value=30, label="SIZE (mm)", elem_classes=["ce-num"])
|
| 628 |
+
gen_btn = gr.Button("GENERATE", elem_classes=["ce-pillbtn"], scale=0)
|
| 629 |
|
| 630 |
# βββββββββββββββββ SLICE Β· slice + analyze + pre-flight check βββββββββββββ
|
| 631 |
with gr.Tab("SLICE", id="build"):
|
core/llm_zerogpu_lora.py
CHANGED
|
@@ -79,10 +79,10 @@ def is_available() -> bool:
|
|
| 79 |
def backend_status() -> str:
|
| 80 |
where = "ZeroGPU" if _HAVE_SPACES else "local GPU/CPU"
|
| 81 |
if not _HAVE_HF:
|
| 82 |
-
return "
|
| 83 |
lora_tag = f" + LoRA({LORA_REPO.split('/')[-1]})" if LORA_REPO else ""
|
| 84 |
loaded = " (loaded)" if _model is not None else " (loads on first analyze)"
|
| 85 |
-
return f"
|
| 86 |
|
| 87 |
|
| 88 |
def _build_prompt(system: str, user: str) -> str:
|
|
|
|
| 79 |
def backend_status() -> str:
|
| 80 |
where = "ZeroGPU" if _HAVE_SPACES else "local GPU/CPU"
|
| 81 |
if not _HAVE_HF:
|
| 82 |
+
return "offline fallback Β· transformers/torch absent (deterministic)"
|
| 83 |
lora_tag = f" + LoRA({LORA_REPO.split('/')[-1]})" if LORA_REPO else ""
|
| 84 |
loaded = " (loaded)" if _model is not None else " (loads on first analyze)"
|
| 85 |
+
return f"live Β· {HF_MODEL}{lora_tag} (transformers on {where}){loaded}"
|
| 86 |
|
| 87 |
|
| 88 |
def _build_prompt(system: str, user: str) -> str:
|
core/nodes.py
CHANGED
|
@@ -26,11 +26,11 @@ def render_node_cards(env: Environment, working: bool = False) -> str:
|
|
| 26 |
cards = []
|
| 27 |
for name, cap, active in NODES:
|
| 28 |
if name == "3D Print":
|
| 29 |
-
state = "
|
| 30 |
sub = f"{env.temp:.0f}Β°C Β· {env.humidity:.0f}% RH"
|
| 31 |
border = "var(--ao-orange)"
|
| 32 |
elif active:
|
| 33 |
-
state = "
|
| 34 |
sub = "coordinating"
|
| 35 |
border = "var(--ao-orange)"
|
| 36 |
else:
|
|
|
|
| 26 |
cards = []
|
| 27 |
for name, cap, active in NODES:
|
| 28 |
if name == "3D Print":
|
| 29 |
+
state = "WORKING" if working else "ONLINE"
|
| 30 |
sub = f"{env.temp:.0f}Β°C Β· {env.humidity:.0f}% RH"
|
| 31 |
border = "var(--ao-orange)"
|
| 32 |
elif active:
|
| 33 |
+
state = "ONLINE"
|
| 34 |
sub = "coordinating"
|
| 35 |
border = "var(--ao-orange)"
|
| 36 |
else:
|
core/theme.py
CHANGED
|
@@ -39,13 +39,20 @@ _MONO = "ui-monospace, SFMono-Regular, Menlo, Consolas, monospace"
|
|
| 39 |
def astrometrics_theme() -> gr.themes.Base:
|
| 40 |
"""Recolor Gradio's component variables to the Astrometrics palette. Both the
|
| 41 |
base and *_dark variants are set so the deck looks identical regardless of the
|
| 42 |
-
browser's light/dark preference (a Space defaults to system).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 43 |
t = gr.themes.Base(
|
| 44 |
primary_hue=gr.themes.colors.orange,
|
| 45 |
secondary_hue=gr.themes.colors.blue,
|
| 46 |
neutral_hue=gr.themes.colors.stone,
|
| 47 |
font=[_MONO], font_mono=[_MONO],
|
| 48 |
radius_size=gr.themes.sizes.radius_none,
|
|
|
|
| 49 |
)
|
| 50 |
pairs = dict(
|
| 51 |
body_background_fill=VOID, body_background_fill_dark=VOID,
|
|
@@ -54,11 +61,18 @@ def astrometrics_theme() -> gr.themes.Base:
|
|
| 54 |
background_fill_primary=VOID, background_fill_primary_dark=VOID,
|
| 55 |
background_fill_secondary=SURFACE, background_fill_secondary_dark=SURFACE,
|
| 56 |
block_background_fill=SURFACE, block_background_fill_dark=SURFACE,
|
| 57 |
-
|
|
|
|
|
|
|
| 58 |
block_label_background_fill=VOID, block_label_background_fill_dark=VOID,
|
| 59 |
block_label_text_color=ORANGE, block_label_text_color_dark=ORANGE,
|
| 60 |
block_title_text_color=ORANGE, block_title_text_color_dark=ORANGE,
|
| 61 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 62 |
color_accent_soft=SURFACE_HI, color_accent_soft_dark=SURFACE_HI,
|
| 63 |
input_background_fill=VOID, input_background_fill_dark=VOID,
|
| 64 |
input_border_color=OUTLINE_DIM, input_border_color_dark=OUTLINE_DIM,
|
|
@@ -67,9 +81,11 @@ def astrometrics_theme() -> gr.themes.Base:
|
|
| 67 |
button_primary_text_color=VOID, button_primary_text_color_dark=VOID,
|
| 68 |
button_secondary_background_fill=SURFACE, button_secondary_background_fill_dark=SURFACE,
|
| 69 |
button_secondary_text_color=ORANGE, button_secondary_text_color_dark=ORANGE,
|
| 70 |
-
button_secondary_border_color=
|
| 71 |
slider_color=ORANGE, slider_color_dark=ORANGE,
|
| 72 |
link_text_color=BLUE, link_text_color_dark=BLUE,
|
|
|
|
|
|
|
| 73 |
)
|
| 74 |
return t.set(**pairs)
|
| 75 |
|
|
@@ -162,27 +178,24 @@ textarea:focus, input:focus {{ border-color:var(--ao-orange) !important; box-sha
|
|
| 162 |
text-transform:uppercase; letter-spacing:1px; font-size:12px; }}
|
| 163 |
|
| 164 |
/* ββ IMPLICIT GROUPING (borderless, proximity-based) ββ */
|
| 165 |
-
/* Model switcher
|
| 166 |
-
#ce-modelswitch {{
|
| 167 |
-
gap:
|
| 168 |
-
|
| 169 |
-
|
| 170 |
-
#ce-warmup {{ background:rgba(95,175,255,0.03); padding:6px 10px; border-radius:0;
|
| 171 |
-
gap:14px; align-items:center; justify-content:flex-end; }}
|
| 172 |
-
|
| 173 |
-
/* Environment sensor readout + randomize button feel like one group: no gap between them */
|
| 174 |
-
#ce-envreadout {{ margin-bottom:2px !important; }}
|
| 175 |
-
#ce-envreadout + .ce-actionbar {{ margin-top:4px !important; }}
|
| 176 |
|
| 177 |
-
/*
|
| 178 |
-
.ce-
|
| 179 |
|
| 180 |
-
/*
|
| 181 |
-
|
|
|
|
|
|
|
|
|
|
| 182 |
|
| 183 |
-
/*
|
| 184 |
-
.ce-
|
| 185 |
-
|
| 186 |
|
| 187 |
/* sliders + ranges */
|
| 188 |
input[type=range] {{ accent-color:var(--ao-orange) !important; }}
|
|
@@ -310,10 +323,8 @@ CSS += """
|
|
| 310 |
.ce-seg label:first-of-type { border-top-left-radius:4px !important; border-bottom-left-radius:4px !important; }
|
| 311 |
.ce-seg label:last-of-type { border-top-right-radius:4px !important; border-bottom-right-radius:4px !important; }
|
| 312 |
|
| 313 |
-
/* model switcher pills sit in the header row */
|
| 314 |
-
#ce-modelswitch {
|
| 315 |
-
#ce-modelswitch .ce-seg label { font-size:11px !important; padding:5px 12px !important; }
|
| 316 |
-
#ce-modelswitch .ce-modeldd { min-width:210px !important; max-width:240px !important; }
|
| 317 |
|
| 318 |
/* hover callout (info icon next to the model switcher) */
|
| 319 |
.ce-callout { position:relative; display:inline-flex; align-items:center; gap:4px; cursor:help;
|
|
|
|
| 39 |
def astrometrics_theme() -> gr.themes.Base:
|
| 40 |
"""Recolor Gradio's component variables to the Astrometrics palette. Both the
|
| 41 |
base and *_dark variants are set so the deck looks identical regardless of the
|
| 42 |
+
browser's light/dark preference (a Space defaults to system).
|
| 43 |
+
|
| 44 |
+
Uses .set() to override CSS variables at the theme level β this is the
|
| 45 |
+
PROPER way to kill borders, reduce spacing, and control component styling.
|
| 46 |
+
The raw CSS string handles only things the theme can't express (LCARS rule
|
| 47 |
+
headers, pill radios, command bar, custom icons, etc.).
|
| 48 |
+
"""
|
| 49 |
t = gr.themes.Base(
|
| 50 |
primary_hue=gr.themes.colors.orange,
|
| 51 |
secondary_hue=gr.themes.colors.blue,
|
| 52 |
neutral_hue=gr.themes.colors.stone,
|
| 53 |
font=[_MONO], font_mono=[_MONO],
|
| 54 |
radius_size=gr.themes.sizes.radius_none,
|
| 55 |
+
spacing_size=gr.themes.sizes.spacing_sm, # tighter than default β sections sit closer
|
| 56 |
)
|
| 57 |
pairs = dict(
|
| 58 |
body_background_fill=VOID, body_background_fill_dark=VOID,
|
|
|
|
| 61 |
background_fill_primary=VOID, background_fill_primary_dark=VOID,
|
| 62 |
background_fill_secondary=SURFACE, background_fill_secondary_dark=SURFACE,
|
| 63 |
block_background_fill=SURFACE, block_background_fill_dark=SURFACE,
|
| 64 |
+
# KILL ALL BLOCK BORDERS via theme variables (the right way)
|
| 65 |
+
block_border_color=VOID, block_border_color_dark=VOID,
|
| 66 |
+
block_border_width="0px", block_border_width_dark="0px",
|
| 67 |
block_label_background_fill=VOID, block_label_background_fill_dark=VOID,
|
| 68 |
block_label_text_color=ORANGE, block_label_text_color_dark=ORANGE,
|
| 69 |
block_title_text_color=ORANGE, block_title_text_color_dark=ORANGE,
|
| 70 |
+
# KILL ALL GENERAL BORDERS
|
| 71 |
+
border_color_primary=VOID, border_color_primary_dark=VOID,
|
| 72 |
+
border_color_accent=VOID, border_color_accent_dark=VOID,
|
| 73 |
+
# BORDERS WIDTH ZERO across the board
|
| 74 |
+
input_border_width="0px",
|
| 75 |
+
button_border_width="0px",
|
| 76 |
color_accent_soft=SURFACE_HI, color_accent_soft_dark=SURFACE_HI,
|
| 77 |
input_background_fill=VOID, input_background_fill_dark=VOID,
|
| 78 |
input_border_color=OUTLINE_DIM, input_border_color_dark=OUTLINE_DIM,
|
|
|
|
| 81 |
button_primary_text_color=VOID, button_primary_text_color_dark=VOID,
|
| 82 |
button_secondary_background_fill=SURFACE, button_secondary_background_fill_dark=SURFACE,
|
| 83 |
button_secondary_text_color=ORANGE, button_secondary_text_color_dark=ORANGE,
|
| 84 |
+
button_secondary_border_color=VOID, button_secondary_border_color_dark=VOID,
|
| 85 |
slider_color=ORANGE, slider_color_dark=ORANGE,
|
| 86 |
link_text_color=BLUE, link_text_color_dark=BLUE,
|
| 87 |
+
# SPACING: tighter section padding via theme variables
|
| 88 |
+
block_padding="6px",
|
| 89 |
)
|
| 90 |
return t.set(**pairs)
|
| 91 |
|
|
|
|
| 178 |
text-transform:uppercase; letter-spacing:1px; font-size:12px; }}
|
| 179 |
|
| 180 |
/* ββ IMPLICIT GROUPING (borderless, proximity-based) ββ */
|
| 181 |
+
/* Model switcher row: NO background tints, NO stretching, inline layout */
|
| 182 |
+
#ce-modelswitch {{ display:flex !important; align-items:center !important;
|
| 183 |
+
gap:8px !important; padding:0 !important; margin:0 0 8px 0 !important;
|
| 184 |
+
background:transparent !important; flex-wrap:wrap !important; }}
|
| 185 |
+
#ce-modelswitch > * {{ flex:0 0 auto !important; min-width:0 !important; max-width:none !important; }}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 186 |
|
| 187 |
+
/* model status: inline, no stretch */
|
| 188 |
+
.ce-status-inline {{ flex:0 0 auto !important; max-width:none !important; }}
|
| 189 |
|
| 190 |
+
/* dropdown: no strange double outlines */
|
| 191 |
+
.ce-modeldd .wrap, .ce-modeldd .secondary-wrap {{
|
| 192 |
+
border:none !important; outline:none !important; box-shadow:none !important; }}
|
| 193 |
+
.ce-modeldd:focus-within .wrap, .ce-modeldd:focus-within .secondary-wrap {{
|
| 194 |
+
outline:1px solid var(--ao-orange) !important; }}
|
| 195 |
|
| 196 |
+
/* contained block: NO padding/margin additions */
|
| 197 |
+
.ce-card {{ padding:0 !important; margin:0 !important; gap:8px !important;
|
| 198 |
+
display:flex !important; flex-direction:column !important; }}
|
| 199 |
|
| 200 |
/* sliders + ranges */
|
| 201 |
input[type=range] {{ accent-color:var(--ao-orange) !important; }}
|
|
|
|
| 323 |
.ce-seg label:first-of-type { border-top-left-radius:4px !important; border-bottom-left-radius:4px !important; }
|
| 324 |
.ce-seg label:last-of-type { border-top-right-radius:4px !important; border-bottom-right-radius:4px !important; }
|
| 325 |
|
| 326 |
+
/* model switcher pills sit in the header row β KEEP concise, don't conflict with main rule */
|
| 327 |
+
#ce-modelswitch .ce-seg label {{ font-size:11px !important; padding:5px 12px !important; }}
|
|
|
|
|
|
|
| 328 |
|
| 329 |
/* hover callout (info icon next to the model switcher) */
|
| 330 |
.ce-callout { position:relative; display:inline-flex; align-items:center; gap:4px; cursor:help;
|
learn/finetune/gguf_pipeline_modal.py
CHANGED
|
@@ -53,7 +53,7 @@ if modal is not None:
|
|
| 53 |
"git clone --depth 1 https://github.com/ggml-org/llama.cpp.git /llama.cpp",
|
| 54 |
"cd /llama.cpp && cmake -B build && cmake --build build --config Release -j$(nproc)",
|
| 55 |
)
|
| 56 |
-
.pip_install("huggingface_hub", "torch", "numpy", "tqdm", "pyyaml", "requests", "safetensors")
|
| 57 |
)
|
| 58 |
|
| 59 |
@app.function(image=gpu_image, gpu="A10G", timeout=1800,
|
|
|
|
| 53 |
"git clone --depth 1 https://github.com/ggml-org/llama.cpp.git /llama.cpp",
|
| 54 |
"cd /llama.cpp && cmake -B build && cmake --build build --config Release -j$(nproc)",
|
| 55 |
)
|
| 56 |
+
.pip_install("huggingface_hub", "torch", "numpy", "tqdm", "pyyaml", "requests", "safetensors", "transformers", "sentencepiece", "gguf", "accelerate")
|
| 57 |
)
|
| 58 |
|
| 59 |
@app.function(image=gpu_image, gpu="A10G", timeout=1800,
|