Spaces:
Sleeping
Sleeping
Commit ·
bc967f5
1
Parent(s): ca5b23e
fix: TRUS-588 - Use BADGE_BASE_URL variable and strip parentheses from badge slugs
Browse filesBadge slug now strips parentheses for clean filenames (e.g., "Grok 4.2 (Beta)" → grok-4.2-beta).
Badge URL now uses BADGE_BASE_URL constant instead of hardcoded URL.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
app.py
CHANGED
|
@@ -77,8 +77,8 @@ def lookup_model(model_name, leaderboard):
|
|
| 77 |
score = scores.get(key)
|
| 78 |
result += f"| {label} | {format_score(score)} |\n"
|
| 79 |
|
| 80 |
-
slug = entry["model"].lower().replace(" ", "-")
|
| 81 |
-
badge_code = f'[
|
| 78 |
result += f"| {label} | {format_score(score)} |\n"
|
| 79 |
|
| 80 |
+
slug = entry["model"].lower().replace(" ", "-").replace("(", "").replace(")", "")
|
| 81 |
+
badge_code = f'[](https://trustmodel.ai/leaderboard)'
|
| 82 |
|
| 83 |
return result, badge_code
|
| 84 |
|