Spaces:
Paused
Paused
siddeshwar-kagatikar commited on
Commit ·
243dfa6
1
Parent(s): 9f98669
Always render Pre/Post-Training dashboard buttons; drop snapshot+difficulty cards
Browse filesRender the Post-Training and Pre-Training dashboard buttons
unconditionally on the Space homepage so visitors can always pick
between the two benchmark dashboards. Each route still serves a 404
when the underlying html is missing, so behavior is safe.
Remove the "Included Snapshot" stat card (Tasks/Provider/Score/Success)
and the "Difficulty Mix" card from the homepage as requested. Update
the lower grid to 2 columns now that only Action Space and Task
Families remain.
Made-with: Cursor
server.py
CHANGED
|
@@ -315,20 +315,10 @@ app = FastAPI(title="OSINT OpenEnv Space", version="0.1.0")
|
|
| 315 |
@app.get("/", response_class=HTMLResponse)
|
| 316 |
def home() -> str:
|
| 317 |
snapshot = _space_snapshot()
|
| 318 |
-
|
| 319 |
-
|
| 320 |
-
compare_links_html =
|
| 321 |
-
|
| 322 |
-
post_training_link = ""
|
| 323 |
-
pre_training_link = ""
|
| 324 |
-
if compare_dashboards.get("post_training"):
|
| 325 |
-
post_training_link = '<a class="button" href="/dashboard/post-training">Post-Training Dashboard</a>'
|
| 326 |
-
if compare_dashboards.get("pre_training"):
|
| 327 |
-
pre_training_link = '<a class="button secondary" href="/dashboard/pre-training">Pre-Training Dashboard</a>'
|
| 328 |
-
compare_links_html = f"<div style=\"margin-top:10px\">{post_training_link}{pre_training_link}</div>"
|
| 329 |
-
difficulty_html = "".join(
|
| 330 |
-
f"<li><strong>{level}</strong>: {count}</li>"
|
| 331 |
-
for level, count in sorted(snapshot["difficulty_counts"].items())
|
| 332 |
)
|
| 333 |
task_type_html = "".join(f"<li>{task_type}</li>" for task_type in snapshot["task_types"])
|
| 334 |
return f"""<!doctype html>
|
|
@@ -360,7 +350,7 @@ def home() -> str:
|
|
| 360 |
.wrap {{ max-width: 1120px; margin: 0 auto; padding: 24px; }}
|
| 361 |
.hero, .grid {{ display: grid; gap: 16px; }}
|
| 362 |
.hero {{ grid-template-columns: 1.5fr 1fr; }}
|
| 363 |
-
.grid {{ grid-template-columns: repeat(
|
| 364 |
.card {{
|
| 365 |
background: var(--card);
|
| 366 |
border: 1px solid var(--line);
|
|
@@ -404,24 +394,13 @@ def home() -> str:
|
|
| 404 |
</head>
|
| 405 |
<body>
|
| 406 |
<div class="wrap">
|
| 407 |
-
<
|
| 408 |
-
<
|
| 409 |
-
|
| 410 |
-
|
| 411 |
-
|
| 412 |
-
|
| 413 |
-
|
| 414 |
-
</section>
|
| 415 |
-
<section class="card">
|
| 416 |
-
<h2>Included Snapshot</h2>
|
| 417 |
-
<div class="stats">
|
| 418 |
-
<div class="stat"><div class="k">Tasks</div><div class="v">{snapshot["task_count"]}</div></div>
|
| 419 |
-
<div class="stat"><div class="k">Provider</div><div class="v">{snapshot["config"]["llm_provider"]}</div></div>
|
| 420 |
-
<div class="stat"><div class="k">Score</div><div class="v">{summary["leaderboard_score"]:.3f}</div></div>
|
| 421 |
-
<div class="stat"><div class="k">Success</div><div class="v">{summary["task_success_rate"]:.3f}</div></div>
|
| 422 |
-
</div>
|
| 423 |
-
</section>
|
| 424 |
-
</div>
|
| 425 |
|
| 426 |
<div class="grid">
|
| 427 |
<section class="card">
|
|
@@ -432,10 +411,6 @@ def home() -> str:
|
|
| 432 |
<li><code>ANSWER</code>: submit the final node id answer.</li>
|
| 433 |
</ul>
|
| 434 |
</section>
|
| 435 |
-
<section class="card">
|
| 436 |
-
<h2>Difficulty Mix</h2>
|
| 437 |
-
<ul>{difficulty_html}</ul>
|
| 438 |
-
</section>
|
| 439 |
<section class="card">
|
| 440 |
<h2>Task Families</h2>
|
| 441 |
<ul>{task_type_html}</ul>
|
|
|
|
| 315 |
@app.get("/", response_class=HTMLResponse)
|
| 316 |
def home() -> str:
|
| 317 |
snapshot = _space_snapshot()
|
| 318 |
+
post_training_link = '<a class="button" href="/dashboard/post-training">Post-Training Dashboard</a>'
|
| 319 |
+
pre_training_link = '<a class="button secondary" href="/dashboard/pre-training">Pre-Training Dashboard</a>'
|
| 320 |
+
compare_links_html = (
|
| 321 |
+
f"<div style=\"margin-top:10px\">{post_training_link}{pre_training_link}</div>"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 322 |
)
|
| 323 |
task_type_html = "".join(f"<li>{task_type}</li>" for task_type in snapshot["task_types"])
|
| 324 |
return f"""<!doctype html>
|
|
|
|
| 350 |
.wrap {{ max-width: 1120px; margin: 0 auto; padding: 24px; }}
|
| 351 |
.hero, .grid {{ display: grid; gap: 16px; }}
|
| 352 |
.hero {{ grid-template-columns: 1.5fr 1fr; }}
|
| 353 |
+
.grid {{ grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 16px; }}
|
| 354 |
.card {{
|
| 355 |
background: var(--card);
|
| 356 |
border: 1px solid var(--line);
|
|
|
|
| 394 |
</head>
|
| 395 |
<body>
|
| 396 |
<div class="wrap">
|
| 397 |
+
<section class="card">
|
| 398 |
+
<h1>OSINT OpenEnv Space</h1>
|
| 399 |
+
<p class="muted">A containerized OpenEnv-compatible benchmark for synthetic OSINT reasoning over profiles, forum threads, posts, aliases, organizations, locations, and event links.</p>
|
| 400 |
+
<p>The Space boots with the fixed-level benchmark so visitors get a stable environment snapshot instead of a different graph every restart.</p>
|
| 401 |
+
<a class="link" href="/api/environment">Environment JSON</a>
|
| 402 |
+
{compare_links_html}
|
| 403 |
+
</section>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 404 |
|
| 405 |
<div class="grid">
|
| 406 |
<section class="card">
|
|
|
|
| 411 |
<li><code>ANSWER</code>: submit the final node id answer.</li>
|
| 412 |
</ul>
|
| 413 |
</section>
|
|
|
|
|
|
|
|
|
|
|
|
|
| 414 |
<section class="card">
|
| 415 |
<h2>Task Families</h2>
|
| 416 |
<ul>{task_type_html}</ul>
|