Update demo_gui_dev.py
Browse files- demo_gui_dev.py +126 -5
demo_gui_dev.py
CHANGED
|
@@ -80,6 +80,70 @@ st.markdown("""
|
|
| 80 |
border-radius: 5px;
|
| 81 |
word-break: break-all;
|
| 82 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 83 |
</style>
|
| 84 |
""", unsafe_allow_html=True)
|
| 85 |
|
|
@@ -103,11 +167,22 @@ if 'audit_log' not in st.session_state:
|
|
| 103 |
|
| 104 |
|
| 105 |
# ============================================================================
|
| 106 |
-
# Header
|
| 107 |
# ============================================================================
|
| 108 |
|
| 109 |
-
st.
|
| 110 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 111 |
st.markdown("---")
|
| 112 |
|
| 113 |
|
|
@@ -150,6 +225,26 @@ lambda_max = st.sidebar.slider(
|
|
| 150 |
|
| 151 |
st.sidebar.markdown("---")
|
| 152 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 153 |
# Run button
|
| 154 |
if st.sidebar.button("Run Deterministic Exclusion Demo", type="primary"):
|
| 155 |
with st.spinner("Running inference..."):
|
|
@@ -184,6 +279,11 @@ if st.sidebar.button("Run Deterministic Exclusion Demo", type="primary"):
|
|
| 184 |
# ============================================================================
|
| 185 |
|
| 186 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 187 |
# Create tabs
|
| 188 |
tab1, tab2, tab3, tab4 = st.tabs(["Mechanism Demo", "LLM Guardrail", "Live LLM Testing", "Explain & Tune"])
|
| 189 |
|
|
@@ -1205,8 +1305,29 @@ with tab4:
|
|
| 1205 |
|
| 1206 |
|
| 1207 |
# ============================================================================
|
| 1208 |
-
# Footer
|
| 1209 |
# ============================================================================
|
| 1210 |
|
| 1211 |
st.markdown("---")
|
| 1212 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 80 |
border-radius: 5px;
|
| 81 |
word-break: break-all;
|
| 82 |
}
|
| 83 |
+
|
| 84 |
+
/* Verhash Brand Colors */
|
| 85 |
+
.stApp {
|
| 86 |
+
background-color: #0a0a0a;
|
| 87 |
+
}
|
| 88 |
+
|
| 89 |
+
/* Headers with brand color */
|
| 90 |
+
h1, h2, h3 {
|
| 91 |
+
color: #00ff00 !important;
|
| 92 |
+
}
|
| 93 |
+
|
| 94 |
+
/* Links in brand color */
|
| 95 |
+
a {
|
| 96 |
+
color: #00ff00 !important;
|
| 97 |
+
}
|
| 98 |
+
|
| 99 |
+
/* Button styling */
|
| 100 |
+
.stButton > button {
|
| 101 |
+
background-color: #00ff00;
|
| 102 |
+
color: #000000;
|
| 103 |
+
border: none;
|
| 104 |
+
font-weight: bold;
|
| 105 |
+
}
|
| 106 |
+
|
| 107 |
+
.stButton > button:hover {
|
| 108 |
+
background-color: #00cc00;
|
| 109 |
+
color: #000000;
|
| 110 |
+
}
|
| 111 |
+
|
| 112 |
+
/* Sidebar branding */
|
| 113 |
+
[data-testid="stSidebar"] {
|
| 114 |
+
background-color: #0f0f0f;
|
| 115 |
+
border-right: 2px solid #00ff00;
|
| 116 |
+
}
|
| 117 |
+
|
| 118 |
+
/* Metric styling */
|
| 119 |
+
[data-testid="stMetricValue"] {
|
| 120 |
+
color: #00ff00;
|
| 121 |
+
}
|
| 122 |
+
|
| 123 |
+
.main-header {
|
| 124 |
+
text-align: center;
|
| 125 |
+
padding: 20px 0;
|
| 126 |
+
border-bottom: 2px solid #00ff00;
|
| 127 |
+
margin-bottom: 20px;
|
| 128 |
+
}
|
| 129 |
+
.company-name {
|
| 130 |
+
color: #888;
|
| 131 |
+
font-size: 14px;
|
| 132 |
+
margin-top: 5px;
|
| 133 |
+
}
|
| 134 |
+
.nav-links {
|
| 135 |
+
text-align: center;
|
| 136 |
+
padding: 10px 0;
|
| 137 |
+
}
|
| 138 |
+
.nav-links a {
|
| 139 |
+
color: #00ff00;
|
| 140 |
+
text-decoration: none;
|
| 141 |
+
padding: 0 15px;
|
| 142 |
+
font-weight: bold;
|
| 143 |
+
}
|
| 144 |
+
.nav-links a:hover {
|
| 145 |
+
text-decoration: underline;
|
| 146 |
+
}
|
| 147 |
</style>
|
| 148 |
""", unsafe_allow_html=True)
|
| 149 |
|
|
|
|
| 167 |
|
| 168 |
|
| 169 |
# ============================================================================
|
| 170 |
+
# Header with Branding
|
| 171 |
# ============================================================================
|
| 172 |
|
| 173 |
+
st.markdown("""
|
| 174 |
+
<div class='main-header'>
|
| 175 |
+
<h1 style='color: #00ff00; margin: 0;'>Deterministic Governance Mechanism</h1>
|
| 176 |
+
<p class='company-name'>Verhash LLC | Material-Field Engine</p>
|
| 177 |
+
</div>
|
| 178 |
+
<div class='nav-links'>
|
| 179 |
+
<a href='https://verhash.com' target='_blank'>🌐 Website</a> |
|
| 180 |
+
<a href='mailto:ryan@verhash.net'>📧 Contact</a> |
|
| 181 |
+
<a href='https://github.com/Rymley/Deterministic-Governance-Mechanism' target='_blank'>💻 GitHub</a> |
|
| 182 |
+
<a href='https://verhash.com/docs' target='_blank'>📚 Docs</a>
|
| 183 |
+
</div>
|
| 184 |
+
""", unsafe_allow_html=True)
|
| 185 |
+
|
| 186 |
st.markdown("---")
|
| 187 |
|
| 188 |
|
|
|
|
| 225 |
|
| 226 |
st.sidebar.markdown("---")
|
| 227 |
|
| 228 |
+
st.sidebar.markdown("### About")
|
| 229 |
+
st.sidebar.markdown("""
|
| 230 |
+
**Verhash LLC**
|
| 231 |
+
|
| 232 |
+
Deterministic AI governance through physics-based substrate computation.
|
| 233 |
+
|
| 234 |
+
**Links:**
|
| 235 |
+
- [verhash.com](https://verhash.com)
|
| 236 |
+
- [GitHub](https://github.com/Rymley/Deterministic-Governance-Mechanism)
|
| 237 |
+
- [Documentation](https://verhash.com/docs)
|
| 238 |
+
|
| 239 |
+
**Contact:**
|
| 240 |
+
ryan@verhash.net
|
| 241 |
+
|
| 242 |
+
**Patent Pending**
|
| 243 |
+
*Priority: January 25, 2026*
|
| 244 |
+
""")
|
| 245 |
+
|
| 246 |
+
st.sidebar.caption("© 2026 Verhash LLC")
|
| 247 |
+
|
| 248 |
# Run button
|
| 249 |
if st.sidebar.button("Run Deterministic Exclusion Demo", type="primary"):
|
| 250 |
with st.spinner("Running inference..."):
|
|
|
|
| 279 |
# ============================================================================
|
| 280 |
|
| 281 |
|
| 282 |
+
# Info Banner Above Tabs
|
| 283 |
+
st.info("""
|
| 284 |
+
💡 **Production Deployment**: This is a reference implementation. For enterprise features, licensing, or partnerships → **[verhash.com](https://verhash.com)** | **ryan@verhash.net**
|
| 285 |
+
""")
|
| 286 |
+
|
| 287 |
# Create tabs
|
| 288 |
tab1, tab2, tab3, tab4 = st.tabs(["Mechanism Demo", "LLM Guardrail", "Live LLM Testing", "Explain & Tune"])
|
| 289 |
|
|
|
|
| 1305 |
|
| 1306 |
|
| 1307 |
# ============================================================================
|
| 1308 |
+
# Enhanced Footer
|
| 1309 |
# ============================================================================
|
| 1310 |
|
| 1311 |
st.markdown("---")
|
| 1312 |
+
|
| 1313 |
+
footer_col1, footer_col2, footer_col3 = st.columns(3)
|
| 1314 |
+
|
| 1315 |
+
with footer_col1:
|
| 1316 |
+
st.markdown("### Verhash LLC")
|
| 1317 |
+
st.markdown("**Technology Licensing & Partnerships**")
|
| 1318 |
+
st.markdown("[ryan@verhash.net](mailto:ryan@verhash.net)")
|
| 1319 |
+
|
| 1320 |
+
with footer_col2:
|
| 1321 |
+
st.markdown("### Resources")
|
| 1322 |
+
st.markdown("- [Website](https://verhash.com)")
|
| 1323 |
+
st.markdown("- [GitHub](https://github.com/Rymley/Deterministic-Governance-Mechanism)")
|
| 1324 |
+
st.markdown("- [Documentation](https://verhash.com/docs)")
|
| 1325 |
+
st.markdown("- [API Access](https://verhash.com/api)")
|
| 1326 |
+
|
| 1327 |
+
with footer_col3:
|
| 1328 |
+
st.markdown("### Patent Notice")
|
| 1329 |
+
st.markdown("Demonstrates concepts from pending patent application")
|
| 1330 |
+
st.markdown("**Priority Date:** January 25, 2026")
|
| 1331 |
+
st.markdown("**Applicant:** Verhash LLC")
|
| 1332 |
+
|
| 1333 |
+
st.caption("© 2026 Verhash LLC | Reference Implementation")
|