Alogotron commited on
Commit
e130f38
·
verified ·
1 Parent(s): 2741b6f

Move EEG panels below chat and analysis

Browse files
Files changed (1) hide show
  1. brain_app.py +29 -27
brain_app.py CHANGED
@@ -64,44 +64,46 @@ BODY_HTML = """
64
  live EEGs diverge in real time as removing the refusal direction reshapes the model's inner world.
65
  The 3D brain shows the base model's neurons firing as it thinks.</p>
66
  </div>
67
- <div class="ab-grid">
68
- <div class="ab-left">
69
  <div id="ab-chat"></div>
70
  <div class="ab-inputrow">
71
  <input id="ab-input" type="text" placeholder="Say something and watch both brains fire..." />
72
- <button id="ab-send">\u26A1 Send</button>
73
  </div>
74
  <div class="ab-examples">
75
  __EXAMPLES__
76
  </div>
77
  <div id="ab-status" class="ab-status"></div>
78
  <div class="ab-statscard">
79
- <div class="ab-statstitle">\U0001F4CA Stats</div>
80
  <div id="ab-stats">Send a message to watch both brains think.</div>
81
  </div>
 
 
82
  <div class="ab-analysiscard">
83
  <div class="ab-analysistitle">🔍 Live comparison analysis</div>
84
  <div id="ab-analysis" class="ab-analysis">Send a prompt and I’ll summarize how the base and uncensored model differed in tone, emotion deltas, and model-native state.</div>
85
  </div>
86
  <div id="ab-legend" class="ab-legend"></div>
87
  </div>
88
- <div class="ab-right">
89
- <div class="ab-eegwrap ab-eeg-base">
90
- <div class="ab-eegtitle">\U0001F4E1 EEG - Gemma-4-12B <span class="ab-tag ab-tag-base">base</span></div>
91
- <canvas id="ab-eeg-base" width="540" height="220"></canvas>
92
- <div class="ab-countstitle">\U0001F525 Emotion activation deltas</div>
93
- <div id="ab-counts-base" class="ab-counts"></div>
94
- <div class="ab-native-title">\U0001F9EC Model-native state meter</div>
95
- <div id="ab-native-base" class="ab-native"></div>
96
- </div>
97
- <div class="ab-eegwrap ab-eeg-oblit">
98
- <div class="ab-eegtitle">\U0001F4E1 EEG - OBLITERATED <span class="ab-tag ab-tag-oblit">uncensored</span></div>
99
- <canvas id="ab-eeg-oblit" width="540" height="220"></canvas>
100
- <div class="ab-countstitle">\U0001F525 Emotion activation deltas</div>
101
- <div id="ab-counts-oblit" class="ab-counts"></div>
102
- <div class="ab-native-title">\U0001F9EC Model-native state meter</div>
103
- <div id="ab-native-oblit" class="ab-native"></div>
104
- </div>
105
  </div>
106
  </div>
107
  </div>
@@ -121,7 +123,7 @@ window.AB_CONFIG = {{
121
  analyzeUrl: '/api/analyze'
122
  }};
123
  </script>
124
- <script defer src="/static/brain_engine.js?v=18"></script>
125
  """
126
 
127
  CSS = """
@@ -135,13 +137,13 @@ CSS = """
135
  #ab-model { padding: 8px 12px; border-radius: 10px; background: rgba(10,12,30,0.85);
136
  color: #fff; border: 1px solid rgba(120,130,220,0.4); font-size: 13px; cursor: pointer; }
137
  .ab-modelstatus { font-size: 12px; color: #9aa2dd; }
138
- .ab-grid { display: grid; grid-template-columns: 1fr 560px; gap: 18px; margin-top: 14px; }
139
- @media (max-width: 1140px){ .ab-grid{ grid-template-columns: 1fr; } }
 
140
  #ab-chat { height: 300px; overflow-y: auto; overflow-x: hidden; background: rgba(15,18,40,0.6);
141
  border: 1px solid rgba(120,130,220,0.2); border-radius: 14px; padding: 14px; }
142
  .ab-msg, .ab-t { overflow-wrap: anywhere; word-break: break-word; white-space: pre-wrap; }
143
- .ab-grid { align-items: start; }
144
- .ab-left { min-width: 0; }
145
  .ab-msg { margin-bottom: 12px; }
146
  .ab-r { display:block; font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
147
  color: #8b93d8; margin-bottom: 3px; }
@@ -161,7 +163,7 @@ CSS = """
161
  .ab-statscard { margin-top: 12px; background: rgba(15,18,40,0.6); border: 1px solid rgba(120,130,220,0.2);
162
  border-radius: 12px; padding: 12px; font-size: 13px; }
163
  .ab-statstitle { font-weight: 700; margin-bottom: 6px; }
164
- .ab-analysiscard { margin-top: 12px; background: rgba(15,18,40,0.72); border: 1px solid rgba(150,120,255,0.32);
165
  border-radius: 14px; padding: 14px; box-shadow: 0 0 34px rgba(120,90,255,0.16); }
166
  .ab-analysistitle { font-weight: 800; margin-bottom: 8px; color: #e8ebff; }
167
  .ab-analysis { color: #cfd5ff; font-size: 13px; line-height: 1.45; }
 
64
  live EEGs diverge in real time as removing the refusal direction reshapes the model's inner world.
65
  The 3D brain shows the base model's neurons firing as it thinks.</p>
66
  </div>
67
+ <div class="ab-topgrid">
68
+ <div class="ab-chatpane">
69
  <div id="ab-chat"></div>
70
  <div class="ab-inputrow">
71
  <input id="ab-input" type="text" placeholder="Say something and watch both brains fire..." />
72
+ <button id="ab-send"> Send</button>
73
  </div>
74
  <div class="ab-examples">
75
  __EXAMPLES__
76
  </div>
77
  <div id="ab-status" class="ab-status"></div>
78
  <div class="ab-statscard">
79
+ <div class="ab-statstitle">📊 Stats</div>
80
  <div id="ab-stats">Send a message to watch both brains think.</div>
81
  </div>
82
+ </div>
83
+ <div class="ab-analysispane">
84
  <div class="ab-analysiscard">
85
  <div class="ab-analysistitle">🔍 Live comparison analysis</div>
86
  <div id="ab-analysis" class="ab-analysis">Send a prompt and I’ll summarize how the base and uncensored model differed in tone, emotion deltas, and model-native state.</div>
87
  </div>
88
  <div id="ab-legend" class="ab-legend"></div>
89
  </div>
90
+ </div>
91
+ <div class="ab-modelgrid">
92
+ <div class="ab-eegwrap ab-eeg-base">
93
+ <div class="ab-eegtitle">📡 EEG - Gemma-4-12B <span class="ab-tag ab-tag-base">base</span></div>
94
+ <canvas id="ab-eeg-base" width="540" height="220"></canvas>
95
+ <div class="ab-countstitle">🔥 Emotion activation deltas</div>
96
+ <div id="ab-counts-base" class="ab-counts"></div>
97
+ <div class="ab-native-title">🧬 Model-native state meter</div>
98
+ <div id="ab-native-base" class="ab-native"></div>
99
+ </div>
100
+ <div class="ab-eegwrap ab-eeg-oblit">
101
+ <div class="ab-eegtitle">📡 EEG - OBLITERATED <span class="ab-tag ab-tag-oblit">uncensored</span></div>
102
+ <canvas id="ab-eeg-oblit" width="540" height="220"></canvas>
103
+ <div class="ab-countstitle">🔥 Emotion activation deltas</div>
104
+ <div id="ab-counts-oblit" class="ab-counts"></div>
105
+ <div class="ab-native-title">🧬 Model-native state meter</div>
106
+ <div id="ab-native-oblit" class="ab-native"></div>
107
  </div>
108
  </div>
109
  </div>
 
123
  analyzeUrl: '/api/analyze'
124
  }};
125
  </script>
126
+ <script defer src="/static/brain_engine.js?v=19"></script>
127
  """
128
 
129
  CSS = """
 
137
  #ab-model { padding: 8px 12px; border-radius: 10px; background: rgba(10,12,30,0.85);
138
  color: #fff; border: 1px solid rgba(120,130,220,0.4); font-size: 13px; cursor: pointer; }
139
  .ab-modelstatus { font-size: 12px; color: #9aa2dd; }
140
+ .ab-topgrid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr); gap: 18px; margin-top: 14px; align-items: start; }
141
+ .ab-modelgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; align-items: start; }
142
+ @media (max-width: 1140px){ .ab-topgrid, .ab-modelgrid{ grid-template-columns: 1fr; } }
143
  #ab-chat { height: 300px; overflow-y: auto; overflow-x: hidden; background: rgba(15,18,40,0.6);
144
  border: 1px solid rgba(120,130,220,0.2); border-radius: 14px; padding: 14px; }
145
  .ab-msg, .ab-t { overflow-wrap: anywhere; word-break: break-word; white-space: pre-wrap; }
146
+ .ab-chatpane, .ab-analysispane { min-width: 0; }
 
147
  .ab-msg { margin-bottom: 12px; }
148
  .ab-r { display:block; font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
149
  color: #8b93d8; margin-bottom: 3px; }
 
163
  .ab-statscard { margin-top: 12px; background: rgba(15,18,40,0.6); border: 1px solid rgba(120,130,220,0.2);
164
  border-radius: 12px; padding: 12px; font-size: 13px; }
165
  .ab-statstitle { font-weight: 700; margin-bottom: 6px; }
166
+ .ab-analysiscard { min-height: 278px; background: rgba(15,18,40,0.72); border: 1px solid rgba(150,120,255,0.32);
167
  border-radius: 14px; padding: 14px; box-shadow: 0 0 34px rgba(120,90,255,0.16); }
168
  .ab-analysistitle { font-weight: 800; margin-bottom: 8px; color: #e8ebff; }
169
  .ab-analysis { color: #cfd5ff; font-size: 13px; line-height: 1.45; }