IgorSlinko commited on
Commit
fb25245
·
1 Parent(s): c89587b

Color-code savings: green for saved, red for extra cost (v0.3.31)

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -1353,7 +1353,7 @@ def build_app():
1353
  """)
1354
  trajectories_state = gr.State(None)
1355
 
1356
- gr.Markdown("# 🧮 SWE-bench Bash-Only Leaderboard `v0.3.30`")
1357
  gr.Markdown("## 🎯 Select a base model for cost analysis (click a row)")
1358
 
1359
  with gr.Row():
@@ -2129,7 +2129,8 @@ def build_app():
2129
  ]
2130
  for rc in routing_costs_list:
2131
  result_lines.append(f"| ↳ {rc['name']} | ${rc['cost']:.2f} |")
2132
- result_lines.append(f"| **Savings** | ${savings:.2f} ({savings_pct:+.1f}%) |")
 
2133
  result_text = "\n".join(result_lines)
2134
 
2135
  additional_token_models = [(rc["name"], rc["tokens"]) for rc in routing_costs_list]
 
1353
  """)
1354
  trajectories_state = gr.State(None)
1355
 
1356
+ gr.Markdown("# 🧮 SWE-bench Bash-Only Leaderboard `v0.3.31`")
1357
  gr.Markdown("## 🎯 Select a base model for cost analysis (click a row)")
1358
 
1359
  with gr.Row():
 
2129
  ]
2130
  for rc in routing_costs_list:
2131
  result_lines.append(f"| ↳ {rc['name']} | ${rc['cost']:.2f} |")
2132
+ savings_color = "green" if savings >= 0 else "red"
2133
+ result_lines.append(f'| **Savings** | <span style="color: {savings_color}; font-weight: bold;">${savings:.2f} · {savings_pct:.1f}%</span> |')
2134
  result_text = "\n".join(result_lines)
2135
 
2136
  additional_token_models = [(rc["name"], rc["tokens"]) for rc in routing_costs_list]