Spaces:
Runtime error
Runtime error
GitHub Copilot
commited on
Commit
·
d77237a
1
Parent(s):
2c281e1
Branding: Realigned to 'SPCW Matroska + Hex Resonance' (Protocol 26)
Browse files
app.py
CHANGED
|
@@ -110,6 +110,13 @@ def get_prime_topology(max_n=1000):
|
|
| 110 |
)
|
| 111 |
return fig
|
| 112 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 113 |
def fetch_manifold_diagnostics():
|
| 114 |
"""
|
| 115 |
Polls the router for live physics state and builds a Gravis 3D Graph.
|
|
@@ -132,10 +139,10 @@ def fetch_manifold_diagnostics():
|
|
| 132 |
</div>
|
| 133 |
<div style='background: rgba(255,0,85,0.1); padding: 10px; border: 1px solid #ff0055; border-radius: 5px;'>
|
| 134 |
<div style='font-size: 10px; color: #888;'>PROTOCOL</div>
|
| 135 |
-
<div style='font-size: 16px; color: #ff0055; font-weight: bold;'>
|
| 136 |
</div>
|
| 137 |
<div style='background: rgba(157,78,221,0.1); padding: 10px; border: 1px solid #9d4edd; border-radius: 5px;'>
|
| 138 |
-
<div style='font-size: 10px; color: #888;'>RESONANCE
|
| 139 |
<div style='font-size: 16px; color: #9d4edd; font-family: monospace;'>{state.get('resonance_product', '1')[:12]}...</div>
|
| 140 |
</div>
|
| 141 |
</div>
|
|
@@ -151,21 +158,27 @@ def fetch_manifold_diagnostics():
|
|
| 151 |
domain = n.get("geometry", {}).get("domain", "INNER_SHELL")
|
| 152 |
name = n.get("name", nid)
|
| 153 |
|
| 154 |
-
# Style based on Domain
|
| 155 |
-
color = "#00ffea" # Inner
|
| 156 |
-
if domain == "PRIME_CHANNEL": color = "#9d4edd"
|
| 157 |
-
elif domain == "OUTER_SHELL": color = "#ff0055"
|
| 158 |
|
| 159 |
size = 15 if n.get("alive") else 5
|
| 160 |
|
| 161 |
-
|
| 162 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 163 |
|
| 164 |
for e in edges:
|
| 165 |
G.add_edge(e["source"], e["target"], color="#333", size=1)
|
| 166 |
|
| 167 |
# Use Gravis Three.js (3D) visualization
|
| 168 |
-
# zoom_factor maps roughly to initial camera distance
|
| 169 |
html_content = gv.three(G,
|
| 170 |
zoom_factor=0.5,
|
| 171 |
node_label_data_source='label',
|
|
@@ -174,8 +187,6 @@ def fetch_manifold_diagnostics():
|
|
| 174 |
use_node_size_normalization=True,
|
| 175 |
node_size_normalization_min=5,
|
| 176 |
node_size_normalization_max=20,
|
| 177 |
-
edge_size_data_source='size',
|
| 178 |
-
show_node_label=True,
|
| 179 |
layout_algorithm_active=True,
|
| 180 |
layout_algorithm="force_directed_3d",
|
| 181 |
height=600).to_html_standalone()
|
|
@@ -198,13 +209,13 @@ def fetch_manifold_diagnostics():
|
|
| 198 |
|
| 199 |
# --- APP LAYOUT ---
|
| 200 |
|
| 201 |
-
with gr.Blocks(theme=gr.themes.Soft(), css=load_css(), title="LOGOS
|
| 202 |
|
| 203 |
# 1. HERO HEADER
|
| 204 |
with gr.Row(elem_classes=["header-row"]):
|
| 205 |
-
gr.Markdown("""
|
| 206 |
-
#
|
| 207 |
-
**
|
| 208 |
""")
|
| 209 |
|
| 210 |
# 2. LIVE TELEMETRY
|
|
|
|
| 110 |
)
|
| 111 |
return fig
|
| 112 |
|
| 113 |
+
|
| 114 |
+
# --- UI TEXT & CONTEXT ---
|
| 115 |
+
|
| 116 |
+
# Replaced "Godel-Zeta" with grounded "SPCW" terms
|
| 117 |
+
PROTOCOL_NAME = "PROTOCOL 26: SPCW MATROSKA"
|
| 118 |
+
SUBTITLE = "Structured Prime-Composite Waveforms + Hex-Resonance Manifold"
|
| 119 |
+
|
| 120 |
def fetch_manifold_diagnostics():
|
| 121 |
"""
|
| 122 |
Polls the router for live physics state and builds a Gravis 3D Graph.
|
|
|
|
| 139 |
</div>
|
| 140 |
<div style='background: rgba(255,0,85,0.1); padding: 10px; border: 1px solid #ff0055; border-radius: 5px;'>
|
| 141 |
<div style='font-size: 10px; color: #888;'>PROTOCOL</div>
|
| 142 |
+
<div style='font-size: 16px; color: #ff0055; font-weight: bold;'>SPCW / MATROSKA</div>
|
| 143 |
</div>
|
| 144 |
<div style='background: rgba(157,78,221,0.1); padding: 10px; border: 1px solid #9d4edd; border-radius: 5px;'>
|
| 145 |
+
<div style='font-size: 10px; color: #888;'>WAVEFORM RESONANCE</div>
|
| 146 |
<div style='font-size: 16px; color: #9d4edd; font-family: monospace;'>{state.get('resonance_product', '1')[:12]}...</div>
|
| 147 |
</div>
|
| 148 |
</div>
|
|
|
|
| 158 |
domain = n.get("geometry", {}).get("domain", "INNER_SHELL")
|
| 159 |
name = n.get("name", nid)
|
| 160 |
|
| 161 |
+
# Style based on Domain (Hex/Heat Context)
|
| 162 |
+
color = "#00ffea" # Inner Structure
|
| 163 |
+
if domain == "PRIME_CHANNEL": color = "#9d4edd" # Prime Composite
|
| 164 |
+
elif domain == "OUTER_SHELL": color = "#ff0055" # Heat/Entropy
|
| 165 |
|
| 166 |
size = 15 if n.get("alive") else 5
|
| 167 |
|
| 168 |
+
# Detailed Hover for Physics Debugging
|
| 169 |
+
hover_txt = f"""
|
| 170 |
+
<b>{name}</b><br>
|
| 171 |
+
Domain: {domain}<br>
|
| 172 |
+
Action: {n.get('action_pending', 'Stable')}<br>
|
| 173 |
+
Heat: {n.get('heat', 0)}
|
| 174 |
+
"""
|
| 175 |
+
|
| 176 |
+
G.add_node(nid, label=name, color=color, size=size, hover=hover_txt)
|
| 177 |
|
| 178 |
for e in edges:
|
| 179 |
G.add_edge(e["source"], e["target"], color="#333", size=1)
|
| 180 |
|
| 181 |
# Use Gravis Three.js (3D) visualization
|
|
|
|
| 182 |
html_content = gv.three(G,
|
| 183 |
zoom_factor=0.5,
|
| 184 |
node_label_data_source='label',
|
|
|
|
| 187 |
use_node_size_normalization=True,
|
| 188 |
node_size_normalization_min=5,
|
| 189 |
node_size_normalization_max=20,
|
|
|
|
|
|
|
| 190 |
layout_algorithm_active=True,
|
| 191 |
layout_algorithm="force_directed_3d",
|
| 192 |
height=600).to_html_standalone()
|
|
|
|
| 209 |
|
| 210 |
# --- APP LAYOUT ---
|
| 211 |
|
| 212 |
+
with gr.Blocks(theme=gr.themes.Soft(), css=load_css(), title="LOGOS: SPCW Matroska") as demo:
|
| 213 |
|
| 214 |
# 1. HERO HEADER
|
| 215 |
with gr.Row(elem_classes=["header-row"]):
|
| 216 |
+
gr.Markdown(f"""
|
| 217 |
+
# {PROTOCOL_NAME}
|
| 218 |
+
**{SUBTITLE}**
|
| 219 |
""")
|
| 220 |
|
| 221 |
# 2. LIVE TELEMETRY
|