shank commited on
Commit
9f6368b
Β·
1 Parent(s): 0a80c48

Polish Gradio CSS styling and add base Qwen baseline to leaderboard

Browse files
Files changed (2) hide show
  1. .gitignore +1 -0
  2. app.py +124 -84
.gitignore CHANGED
@@ -59,3 +59,4 @@ baseline_results.json
59
  CURSOR_INSTRUCTIONS_V2.md
60
  HANDOVER.md
61
  read.md
 
 
59
  CURSOR_INSTRUCTIONS_V2.md
60
  HANDOVER.md
61
  read.md
62
+ claude.md
app.py CHANGED
@@ -140,69 +140,88 @@ MOCK_TRAJECTORIES = {
140
  }
141
  }
142
 
143
- # ── Custom CSS for Premium Design ─────────────────────────────────────────────
144
  CUSTOM_CSS = """
145
  body {
146
- background-color: #0b0f19 !important;
147
- font-family: 'Inter', sans-serif !important;
 
148
  }
149
 
150
  .gradio-container {
151
- max-width: 1300px !important;
 
152
  }
153
 
154
  /* Glassmorphism Panels */
155
  .glass-panel {
156
- background: rgba(17, 25, 40, 0.75) !important;
157
- backdrop-filter: blur(12px) !important;
158
- -webkit-backdrop-filter: blur(12px) !important;
159
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
160
- border-radius: 16px !important;
161
- padding: 1.5rem !important;
162
- box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3) !important;
163
  }
164
 
165
  .glass-header {
166
- background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(99, 102, 241, 0.15)) !important;
167
- backdrop-filter: blur(8px) !important;
168
- border: 1px solid rgba(255, 255, 255, 0.1) !important;
169
- border-radius: 16px !important;
170
- padding: 2rem !important;
 
171
  text-align: center;
172
- margin-bottom: 2rem;
 
173
  }
174
 
175
  /* Title styling */
176
- .header-title h1 {
177
- font-size: 2.8rem !important;
178
- font-weight: 800 !important;
179
- background: linear-gradient(to right, #c084fc, #818cf8) !important;
 
 
180
  -webkit-background-clip: text !important;
181
  -webkit-text-fill-color: transparent !important;
 
 
 
 
 
 
 
 
 
182
  margin-bottom: 0.5rem !important;
183
  }
184
 
185
- /* Table Style overrides */
186
- .leaderboard-table table {
187
- width: 100%;
188
- border-collapse: collapse;
 
 
 
 
 
 
 
189
  }
190
 
191
- .leaderboard-table th {
192
- background: rgba(255, 255, 255, 0.05);
193
- color: #94a3b8;
194
- text-transform: uppercase;
195
- font-size: 0.75rem;
196
- font-weight: 700;
197
- letter-spacing: 0.05em;
198
- padding: 0.75rem 1rem;
199
- border-bottom: 1px solid rgba(255, 255, 255, 0.1);
200
  }
201
 
202
- .leaderboard-table td {
203
- padding: 1rem;
204
- border-bottom: 1px solid rgba(255, 255, 255, 0.05);
205
- color: #f8fafc;
206
  }
207
 
208
  /* Accent Buttons */
@@ -211,22 +230,28 @@ body {
211
  color: white !important;
212
  border: none !important;
213
  font-weight: 600 !important;
214
- transition: all 0.3s ease !important;
 
 
 
 
215
  }
216
 
217
  .accent-btn:hover {
218
  transform: translateY(-2px) !important;
219
- box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4) !important;
220
  }
 
221
  .mt-8 {
222
  margin-top: 2rem !important;
223
  }
224
 
225
  /* Code fonts */
226
  .code-container {
227
- font-family: 'Fira Code', 'JetBrains Mono', monospace !important;
228
- background-color: #070913 !important;
229
- border-radius: 8px !important;
 
230
  }
231
  """
232
 
@@ -237,65 +262,81 @@ def render_leaderboard_html(summary_data):
237
  t2 = summary_data.get("tiers", {}).get("tier2", {})
238
  t3 = summary_data.get("tiers", {}).get("tier3", {})
239
 
240
- qwen_overall = f"{overall.get('solve_rate', 0.672):.1%}"
241
  qwen_t1 = f"{t1.get('solve_rate', 1.0):.1%}"
242
  qwen_t2 = f"{t2.get('solve_rate', 0.774):.1%}"
243
  qwen_t3 = f"{t3.get('solve_rate', 0.381):.1%}"
244
  qwen_mean = f"{sum([t1.get('solve_rate', 1.0), t2.get('solve_rate', 0.774), t3.get('solve_rate', 0.381)]) / 3:.3f}"
245
 
246
  html = f"""
247
- <div style="background: rgba(30, 41, 59, 0.7); backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,0.1); border-radius: 16px; padding: 2rem; box-shadow: 0 4px 30px rgba(0,0,0,0.1);">
248
- <table style="width: 100%; border-collapse: collapse;">
249
  <thead>
250
- <tr style="border-bottom: 1px solid rgba(255,255,255,0.1);">
251
- <th style="padding: 1rem; text-align: left; color: #94a3b8; font-weight: 600; text-transform: uppercase; font-size: 0.85rem;">Rank</th>
252
- <th style="padding: 1rem; text-align: left; color: #94a3b8; font-weight: 600; text-transform: uppercase; font-size: 0.85rem;">Model</th>
253
- <th style="padding: 1rem; text-align: left; color: #94a3b8; font-weight: 600; text-transform: uppercase; font-size: 0.85rem;">Tier 1 (Easy)</th>
254
- <th style="padding: 1rem; text-align: left; color: #94a3b8; font-weight: 600; text-transform: uppercase; font-size: 0.85rem;">Tier 2 (Med)</th>
255
- <th style="padding: 1rem; text-align: left; color: #94a3b8; font-weight: 600; text-transform: uppercase; font-size: 0.85rem;">Tier 3 (Hard)</th>
256
- <th style="padding: 1rem; text-align: left; color: #94a3b8; font-weight: 600; text-transform: uppercase; font-size: 0.85rem;">Mean Score</th>
257
  </tr>
258
  </thead>
259
  <tbody>
260
- <tr style="border-bottom: 1px solid rgba(255,255,255,0.05); hover: background-color: rgba(255,255,255,0.02);">
261
- <td style="padding: 1rem; font-size: 1.1rem;">πŸ₯‡ 1</td>
262
- <td style="padding: 1rem; font-weight: 600; color: #f8fafc;">GPT-4o</td>
263
- <td style="padding: 1rem; color: #10b981; font-weight: bold;">89.0%</td>
264
- <td style="padding: 1rem; color: #f59e0b; font-weight: bold;">71.0%</td>
265
- <td style="padding: 1rem; color: #ef4444; font-weight: bold;">38.0%</td>
266
- <td style="padding: 1rem;">
267
- <span style="font-weight: 700; font-size: 1.1rem;">0.742</span>
268
- <div style="width: 100px; background: rgba(255,255,255,0.1); border-radius: 4px; height: 6px; overflow: hidden; margin-top: 4px;">
 
269
  <div style="width: 74.2%; height: 100%; background: linear-gradient(90deg, #6366f1, #8b5cf6);"></div>
270
  </div>
271
  </td>
272
  </tr>
273
- <tr style="border-bottom: 1px solid rgba(255,255,255,0.05); background: rgba(139, 92, 246, 0.05);">
274
- <td style="padding: 1rem; font-size: 1.1rem;">πŸ₯ˆ 2</td>
275
- <td style="padding: 1rem; font-weight: 600; color: #a78bfa;">
 
276
  AgentDebugger-Qwen2.5-3B-GRPO
277
- <span style="background: linear-gradient(135deg, #8b5cf6, #6366f1); padding: 2px 6px; border-radius: 4px; font-size: 0.65rem; color: white; margin-left: 6px;">Trained</span>
278
  </td>
279
- <td style="padding: 1rem; color: #10b981; font-weight: bold;">{qwen_t1}</td>
280
- <td style="padding: 1rem; color: #10b981; font-weight: bold;">{qwen_t2}</td>
281
- <td style="padding: 1rem; color: #f59e0b; font-weight: bold;">{qwen_t3}</td>
282
- <td style="padding: 1rem;">
283
- <span style="font-weight: 700; font-size: 1.1rem; color: #a78bfa;">{qwen_mean}</span>
284
- <div style="width: 100px; background: rgba(255,255,255,0.1); border-radius: 4px; height: 6px; overflow: hidden; margin-top: 4px;">
285
- <div style="width: {float(qwen_mean)*100:.1f}%; height: 100%; background: linear-gradient(90deg, #8b5cf6, #ec4899);"></div>
286
  </div>
287
  </td>
288
  </tr>
289
- <tr style="border-bottom: 1px solid rgba(255,255,255,0.05);">
290
- <td style="padding: 1rem; font-size: 1.1rem;">πŸ₯‰ 3</td>
291
- <td style="padding: 1rem; font-weight: 600; color: #cbd5e1;">Llama-3.1-70B-Instruct <span style="background: rgba(255,255,255,0.1); padding: 2px 6px; border-radius: 4px; font-size: 0.65rem; color: #94a3b8; margin-left: 6px;">Baseline</span></td>
292
- <td style="padding: 1rem; color: #ef4444; font-weight: bold;">21.0%</td>
293
- <td style="padding: 1rem; color: #ef4444; font-weight: bold;">21.5%</td>
294
- <td style="padding: 1rem; color: #ef4444; font-weight: bold;">21.5%</td>
295
- <td style="padding: 1rem;">
296
- <span style="font-weight: 700; font-size: 1.1rem;">0.210</span>
297
- <div style="width: 100px; background: rgba(255,255,255,0.1); border-radius: 4px; height: 6px; overflow: hidden; margin-top: 4px;">
298
- <div style="width: 21%; height: 100%; background: #64748b;"></div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
299
  </div>
300
  </td>
301
  </tr>
@@ -430,8 +471,7 @@ with gr.Blocks(title="AgentDebuggerEnv Research Hub") as demo:
430
  # 🐞 AgentDebuggerEnv
431
  ### Interactive Research Showcase & Leaderboard
432
  *Aligning LLMs on Hypothesis-Driven Debugging using GRPO Reinforcement Learning*
433
- """,
434
- elem_classes=["header-title"]
435
  )
436
 
437
  with gr.Tabs():
 
140
  }
141
  }
142
 
 
143
  CUSTOM_CSS = """
144
  body {
145
+ background-color: #030712 !important;
146
+ background-image: radial-gradient(circle at 50% -20%, #1e1b4b, #030712 60%) !important;
147
+ font-family: 'Inter', -apple-system, sans-serif !important;
148
  }
149
 
150
  .gradio-container {
151
+ max-width: 1280px !important;
152
+ padding: 2rem 1rem !important;
153
  }
154
 
155
  /* Glassmorphism Panels */
156
  .glass-panel {
157
+ background: rgba(17, 24, 39, 0.6) !important;
158
+ backdrop-filter: blur(16px) !important;
159
+ -webkit-backdrop-filter: blur(16px) !important;
160
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
161
+ border-radius: 20px !important;
162
+ padding: 2rem !important;
163
+ box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.5) !important;
164
  }
165
 
166
  .glass-header {
167
+ background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(59, 130, 246, 0.1)) !important;
168
+ backdrop-filter: blur(16px) !important;
169
+ -webkit-backdrop-filter: blur(16px) !important;
170
+ border: 1px solid rgba(139, 92, 246, 0.2) !important;
171
+ border-radius: 24px !important;
172
+ padding: 3rem 2rem !important;
173
  text-align: center;
174
+ margin-bottom: 2.5rem;
175
+ box-shadow: 0 10px 30px -10px rgba(139, 92, 246, 0.3) !important;
176
  }
177
 
178
  /* Title styling */
179
+ .glass-header h1, .glass-header .prose h1 {
180
+ font-family: 'Outfit', sans-serif !important;
181
+ font-size: 3.5rem !important;
182
+ font-weight: 900 !important;
183
+ letter-spacing: -0.03em !important;
184
+ background: linear-gradient(to right, #c084fc, #60a5fa) !important;
185
  -webkit-background-clip: text !important;
186
  -webkit-text-fill-color: transparent !important;
187
+ margin-top: 0 !important;
188
+ margin-bottom: 0.5rem !important;
189
+ }
190
+
191
+ .glass-header h3, .glass-header .prose h3 {
192
+ font-size: 1.25rem !important;
193
+ color: #94a3b8 !important;
194
+ font-weight: 500 !important;
195
+ margin-top: 0 !important;
196
  margin-bottom: 0.5rem !important;
197
  }
198
 
199
+ .glass-header p, .glass-header .prose p {
200
+ font-size: 1.05rem !important;
201
+ color: #cbd5e1 !important;
202
+ font-style: italic !important;
203
+ margin: 0 !important;
204
+ }
205
+
206
+ /* Tab styling overrides */
207
+ .gradio-container .tabs {
208
+ border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
209
+ margin-bottom: 1.5rem !important;
210
  }
211
 
212
+ .gradio-container .tabs button {
213
+ border: none !important;
214
+ background: transparent !important;
215
+ font-size: 1.05rem !important;
216
+ font-weight: 600 !important;
217
+ color: #64748b !important;
218
+ padding: 0.75rem 1.5rem !important;
219
+ transition: all 0.3s ease !important;
 
220
  }
221
 
222
+ .gradio-container .tabs button.selected {
223
+ color: #c084fc !important;
224
+ border-bottom: 2px solid #8b5cf6 !important;
 
225
  }
226
 
227
  /* Accent Buttons */
 
230
  color: white !important;
231
  border: none !important;
232
  font-weight: 600 !important;
233
+ font-size: 1rem !important;
234
+ padding: 0.75rem 1.5rem !important;
235
+ border-radius: 12px !important;
236
+ cursor: pointer !important;
237
+ transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
238
  }
239
 
240
  .accent-btn:hover {
241
  transform: translateY(-2px) !important;
242
+ box-shadow: 0 8px 24px rgba(139, 92, 246, 0.5) !important;
243
  }
244
+
245
  .mt-8 {
246
  margin-top: 2rem !important;
247
  }
248
 
249
  /* Code fonts */
250
  .code-container {
251
+ font-family: 'JetBrains Mono', 'Fira Code', monospace !important;
252
+ background-color: #080c15 !important;
253
+ border: 1px solid rgba(255, 255, 255, 0.05) !important;
254
+ border-radius: 12px !important;
255
  }
256
  """
257
 
 
262
  t2 = summary_data.get("tiers", {}).get("tier2", {})
263
  t3 = summary_data.get("tiers", {}).get("tier3", {})
264
 
 
265
  qwen_t1 = f"{t1.get('solve_rate', 1.0):.1%}"
266
  qwen_t2 = f"{t2.get('solve_rate', 0.774):.1%}"
267
  qwen_t3 = f"{t3.get('solve_rate', 0.381):.1%}"
268
  qwen_mean = f"{sum([t1.get('solve_rate', 1.0), t2.get('solve_rate', 0.774), t3.get('solve_rate', 0.381)]) / 3:.3f}"
269
 
270
  html = f"""
271
+ <div style="background: rgba(17, 24, 39, 0.75); backdrop-filter: blur(20px); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 20px; padding: 2rem; box-shadow: 0 10px 40px rgba(0,0,0,0.5);">
272
+ <table style="width: 100%; border-collapse: collapse; text-align: left; font-family: 'Inter', sans-serif;">
273
  <thead>
274
+ <tr style="border-bottom: 1px solid rgba(255, 255, 255, 0.15);">
275
+ <th style="padding: 1.25rem 1rem; color: #94a3b8; font-weight: 600; text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.05em;">Rank</th>
276
+ <th style="padding: 1.25rem 1rem; color: #94a3b8; font-weight: 600; text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.05em;">Model</th>
277
+ <th style="padding: 1.25rem 1rem; color: #94a3b8; font-weight: 600; text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.05em; text-align: center;">Tier 1 (Easy)</th>
278
+ <th style="padding: 1.25rem 1rem; color: #94a3b8; font-weight: 600; text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.05em; text-align: center;">Tier 2 (Med)</th>
279
+ <th style="padding: 1.25rem 1rem; color: #94a3b8; font-weight: 600; text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.05em; text-align: center;">Tier 3 (Hard)</th>
280
+ <th style="padding: 1.25rem 1rem; color: #94a3b8; font-weight: 600; text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.05em;">Mean Score</th>
281
  </tr>
282
  </thead>
283
  <tbody>
284
+ <!-- Rank 1 -->
285
+ <tr style="border-bottom: 1px solid rgba(255, 255, 255, 0.06); transition: all 0.2s;">
286
+ <td style="padding: 1.25rem 1rem; font-size: 1.1rem; font-weight: bold; color: #fbbf24;">πŸ₯‡ 1</td>
287
+ <td style="padding: 1.25rem 1rem; font-weight: 600; color: #f8fafc; font-size: 0.95rem;">GPT-4o</td>
288
+ <td style="padding: 1.25rem 1rem; color: #10b981; font-weight: bold; text-align: center;">89.0%</td>
289
+ <td style="padding: 1.25rem 1rem; color: #f59e0b; font-weight: bold; text-align: center;">71.0%</td>
290
+ <td style="padding: 1.25rem 1rem; color: #ef4444; font-weight: bold; text-align: center;">38.0%</td>
291
+ <td style="padding: 1.25rem 1rem;">
292
+ <span style="font-weight: 700; font-size: 1.1rem; color: #f8fafc;">0.742</span>
293
+ <div style="width: 100px; background: rgba(255, 255, 255, 0.1); border-radius: 4px; height: 6px; overflow: hidden; margin-top: 6px;">
294
  <div style="width: 74.2%; height: 100%; background: linear-gradient(90deg, #6366f1, #8b5cf6);"></div>
295
  </div>
296
  </td>
297
  </tr>
298
+ <!-- Rank 2 (Trained) -->
299
+ <tr style="border-bottom: 1px solid rgba(255, 255, 255, 0.06); background: rgba(139, 92, 246, 0.08); box-shadow: inset 0 0 12px rgba(139, 92, 246, 0.15);">
300
+ <td style="padding: 1.25rem 1rem; font-size: 1.1rem; font-weight: bold; color: #e2e8f0;">πŸ₯ˆ 2</td>
301
+ <td style="padding: 1.25rem 1rem; font-weight: 600; color: #c084fc; font-size: 0.95rem;">
302
  AgentDebugger-Qwen2.5-3B-GRPO
303
+ <span style="background: linear-gradient(135deg, #a78bfa, #6366f1); padding: 3px 8px; border-radius: 6px; font-size: 0.65rem; color: white; font-weight: bold; margin-left: 8px; box-shadow: 0 2px 8px rgba(139, 92, 246, 0.4);">Trained</span>
304
  </td>
305
+ <td style="padding: 1.25rem 1rem; color: #10b981; font-weight: bold; text-align: center;">{qwen_t1}</td>
306
+ <td style="padding: 1.25rem 1rem; color: #10b981; font-weight: bold; text-align: center;">{qwen_t2}</td>
307
+ <td style="padding: 1.25rem 1rem; color: #f59e0b; font-weight: bold; text-align: center;">{qwen_t3}</td>
308
+ <td style="padding: 1.25rem 1rem;">
309
+ <span style="font-weight: 700; font-size: 1.1rem; color: #c084fc;">{qwen_mean}</span>
310
+ <div style="width: 100px; background: rgba(255, 255, 255, 0.1); border-radius: 4px; height: 6px; overflow: hidden; margin-top: 6px;">
311
+ <div style="width: {float(qwen_mean)*100:.1f}%; height: 100%; background: linear-gradient(90deg, #a78bfa, #ec4899);"></div>
312
  </div>
313
  </td>
314
  </tr>
315
+ <!-- Rank 3 (Llama) -->
316
+ <tr style="border-bottom: 1px solid rgba(255, 255, 255, 0.06); transition: all 0.2s;">
317
+ <td style="padding: 1.25rem 1rem; font-size: 1.1rem; font-weight: bold; color: #cd7f32;">πŸ₯‰ 3</td>
318
+ <td style="padding: 1.25rem 1rem; font-weight: 600; color: #cbd5e1; font-size: 0.95rem;">Llama-3.1-70B-Instruct <span style="background: rgba(255, 255, 255, 0.08); padding: 3px 8px; border-radius: 6px; font-size: 0.65rem; color: #94a3b8; margin-left: 8px; font-weight: bold;">Baseline</span></td>
319
+ <td style="padding: 1.25rem 1rem; color: #ef4444; font-weight: bold; text-align: center;">21.0%</td>
320
+ <td style="padding: 1.25rem 1rem; color: #ef4444; font-weight: bold; text-align: center;">21.5%</td>
321
+ <td style="padding: 1.25rem 1rem; color: #ef4444; font-weight: bold; text-align: center;">21.5%</td>
322
+ <td style="padding: 1.25rem 1rem;">
323
+ <span style="font-weight: 700; font-size: 1.1rem; color: #cbd5e1;">0.210</span>
324
+ <div style="width: 100px; background: rgba(255, 255, 255, 0.1); border-radius: 4px; height: 6px; overflow: hidden; margin-top: 6px;">
325
+ <div style="width: 21.0%; height: 100%; background: #64748b;"></div>
326
+ </div>
327
+ </td>
328
+ </tr>
329
+ <!-- Rank 4 (Qwen Base) -->
330
+ <tr style="border-bottom: 1px solid rgba(255, 255, 255, 0.06); transition: all 0.2s;">
331
+ <td style="padding: 1.25rem 1rem; font-size: 1.1rem; font-weight: bold; color: #64748b;">4</td>
332
+ <td style="padding: 1.25rem 1rem; font-weight: 600; color: #94a3b8; font-size: 0.95rem;">Qwen2.5-Coder-3B-Instruct <span style="background: rgba(239, 68, 68, 0.1); border: 1px solid rgba(239, 68, 68, 0.2); padding: 3px 8px; border-radius: 6px; font-size: 0.65rem; color: #f87171; margin-left: 8px; font-weight: bold;">Base Model</span></td>
333
+ <td style="padding: 1.25rem 1rem; color: #ef4444; font-weight: bold; text-align: center;">15.0%</td>
334
+ <td style="padding: 1.25rem 1rem; color: #ef4444; font-weight: bold; text-align: center;">8.0%</td>
335
+ <td style="padding: 1.25rem 1rem; color: #ef4444; font-weight: bold; text-align: center;">2.0%</td>
336
+ <td style="padding: 1.25rem 1rem;">
337
+ <span style="font-weight: 700; font-size: 1.1rem; color: #94a3b8;">0.083</span>
338
+ <div style="width: 100px; background: rgba(255, 255, 255, 0.1); border-radius: 4px; height: 6px; overflow: hidden; margin-top: 6px;">
339
+ <div style="width: 8.3%; height: 100%; background: #ef4444;"></div>
340
  </div>
341
  </td>
342
  </tr>
 
471
  # 🐞 AgentDebuggerEnv
472
  ### Interactive Research Showcase & Leaderboard
473
  *Aligning LLMs on Hypothesis-Driven Debugging using GRPO Reinforcement Learning*
474
+ """
 
475
  )
476
 
477
  with gr.Tabs():