Spaces:
Sleeping
Sleeping
Download server/ui_console.html from GTsingh12/ATS-openenv: direct link, hf CLI and curl.
- Browser
- Download file 37.9 kB
-
https://huggingface.co/spaces/GTsingh12/ATS-openenv/resolve/main/server/ui_console.html
- Command line
-
hf download hf://spaces/GTsingh12/ATS-openenv/server/ui_console.html
-
curl -L -o ui_console.html https://huggingface.co/spaces/GTsingh12/ATS-openenv/resolve/main/server/ui_console.html
37.9 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ATC Optimization OpenEnv</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=Libre+Baskerville:wght@400;700&family=Source+Sans+3:wght@400;600;700&display=swap" rel="stylesheet">
<style>
:root {
--bg: #0d1318;
--panel: #151d24;
--panel-soft: #1b2530;
--line: #31404d;
--line-soft: rgba(255, 255, 255, 0.08);
--text: #edf1f5;
--muted: #a7b2bd;
--gold: #c5a66a;
--gold-soft: rgba(197, 166, 106, 0.14);
--blue: #8aa2b7;
--blue-soft: rgba(138, 162, 183, 0.16);
--green: #79cc95;
--green-soft: rgba(121, 204, 149, 0.16);
--amber: #d8a261;
--red: #cb6f66;
--mono: "IBM Plex Mono", monospace;
--body: "Source Sans 3", sans-serif;
--serif: "Libre Baskerville", serif;
}
* { box-sizing: border-box; }
body {
margin: 0;
background: linear-gradient(180deg, #0a0f14 0%, #0d1318 100%);
color: var(--text);
font-family: var(--body);
}
.shell {
width: min(1280px, calc(100vw - 28px));
margin: 0 auto;
padding: 22px 0 34px;
}
.masthead,
.panel {
border: 1px solid var(--line);
background: linear-gradient(180deg, rgba(22, 30, 37, 0.95), rgba(18, 24, 31, 0.98));
box-shadow: 0 18px 40px rgba(0, 0, 0, 0.24);
}
.masthead {
display: flex;
justify-content: space-between;
gap: 16px;
align-items: flex-end;
padding: 20px 24px;
border-radius: 18px;
margin-bottom: 18px;
}
.eyebrow {
margin: 0 0 10px;
color: var(--gold);
text-transform: uppercase;
letter-spacing: 0.24em;
font-size: 11px;
font-family: var(--mono);
}
h1 {
margin: 0 0 8px;
font-family: var(--serif);
font-size: clamp(34px, 5vw, 52px);
line-height: 1.02;
font-weight: 700;
}
.lead {
margin: 0;
max-width: 58ch;
color: var(--muted);
font-size: 15px;
line-height: 1.7;
}
.status-box {
display: grid;
gap: 10px;
min-width: 220px;
justify-items: end;
}
.status-pill {
display: inline-flex;
align-items: center;
gap: 10px;
padding: 9px 14px;
border-radius: 999px;
border: 1px solid var(--line);
background: #111820;
font-size: 12px;
text-transform: uppercase;
letter-spacing: 0.12em;
color: var(--muted);
}
.status-dot {
width: 10px;
height: 10px;
border-radius: 50%;
background: var(--green);
box-shadow: 0 0 14px rgba(121, 204, 149, 0.7);
animation: pulse-dot 1.6s ease-in-out infinite;
}
.clock {
font-family: var(--mono);
color: var(--blue);
font-size: 12px;
}
.main-grid {
display: grid;
grid-template-columns: 1.2fr 0.8fr;
gap: 18px;
margin-bottom: 18px;
}
.panel {
border-radius: 18px;
padding: 22px;
}
.shell > .panel + .panel,
.shell > section.panel {
margin-top: 18px;
}
.section-title {
margin: 0 0 14px;
font-family: var(--mono);
font-size: 11px;
color: var(--muted);
text-transform: uppercase;
letter-spacing: 0.18em;
}
.scene-card {
border: 1px solid var(--line);
border-radius: 18px;
overflow: hidden;
/* Sky: deep pre-dawn navy fading toward a blue horizon */
background: linear-gradient(180deg,
#06121e 0%,
#0b2238 18%,
#12395e 42%,
#1a5278 62%,
#1e5c84 78%,
#225f86 100%
);
position: relative;
min-height: 330px;
}
.scene-header {
display: flex;
justify-content: space-between;
gap: 16px;
align-items: center;
padding: 16px 18px;
border-bottom: 1px solid var(--line-soft);
position: relative;
z-index: 2;
background: rgba(15, 21, 27, 0.55);
}
.scene-header strong {
display: block;
font-family: var(--serif);
font-size: 21px;
margin-bottom: 4px;
}
.scene-header span {
color: var(--muted);
font-size: 14px;
}
.scene-badge {
padding: 8px 12px;
border-radius: 999px;
border: 1px solid var(--line);
background: rgba(17, 24, 32, 0.88);
font-family: var(--mono);
font-size: 11px;
color: var(--gold);
text-transform: uppercase;
letter-spacing: 0.14em;
}
.scene-stage {
position: relative;
min-height: 250px;
overflow: hidden;
}
.scene-stage-inner {
position: absolute;
inset: 0;
}
/* Horizon atmospheric glow */
.scene-stage::after {
content: "";
position: absolute;
left: 0; right: 0;
bottom: 38%;
height: 28px;
background: linear-gradient(180deg,
transparent 0%,
rgba(90, 170, 215, 0.22) 50%,
transparent 100%
);
filter: blur(5px);
pointer-events: none;
z-index: 1;
}
/* Ground plane — airport tarmac surface below the horizon */
.scene-ground {
position: absolute;
left: 0; right: 0; bottom: 0;
height: 40%;
background: linear-gradient(180deg,
rgba(12, 20, 10, 0) 0%,
rgba(14, 22, 12, 0.72) 22%,
rgba(10, 18, 9, 0.96) 55%,
#090e08 100%
);
z-index: 1;
pointer-events: none;
}
.runway {
position: absolute;
left: 8%;
right: 8%;
bottom: 0;
height: 54px;
border-radius: 3px 3px 0 0;
overflow: hidden;
background: linear-gradient(180deg, #3d4a56 0%, #28333e 40%, #1d2830 100%);
z-index: 2;
}
/* Edge stripe lines */
.runway::before {
content: '';
position: absolute;
top: 0; left: 0; right: 0;
height: 3px;
background: rgba(255, 255, 255, 0.80);
z-index: 3;
}
.runway::after {
content: '';
position: absolute;
bottom: 0; left: 0; right: 0;
height: 3px;
background: rgba(255, 255, 255, 0.80);
z-index: 3;
}
/* Runway designation number */
.rwy-number {
position: absolute;
left: 1.4%;
top: 50%;
transform: translateY(-50%);
font-family: 'Arial Narrow', Arial, sans-serif;
font-size: 10px;
font-weight: 900;
color: rgba(255, 255, 255, 0.50);
letter-spacing: 0.5px;
line-height: 1;
pointer-events: none;
z-index: 2;
}
/* Threshold line — single white stripe at the approach end */
.rwy-threshold {
position: absolute;
left: 5%;
top: 0;
bottom: 0;
width: 4px;
background: rgba(255, 255, 255, 0.80);
z-index: 2;
}
.rwy-threshold span { display: none; }
/* Dashed centreline */
.rwy-centerline {
position: absolute;
top: 50%;
left: 8%;
right: 4%;
height: 3px;
transform: translateY(-50%);
background: repeating-linear-gradient(
90deg,
rgba(255, 255, 255, 0.82) 0px,
rgba(255, 255, 255, 0.82) 20px,
transparent 20px,
transparent 40px
);
z-index: 2;
}
/* Touchdown zone marks */
.rwy-tdz {
position: absolute;
top: 14%;
bottom: 14%;
left: 8%;
width: 7%;
display: flex;
gap: 2px;
z-index: 2;
}
.rwy-tdz span {
flex: 1;
background: rgba(255, 255, 255, 0.60);
border-radius: 1px;
}
/* Edge light dots — top row */
.rwy-edge-t {
position: absolute;
top: 5px;
left: 3%;
right: 3%;
height: 3px;
background: repeating-linear-gradient(
90deg,
rgba(255, 255, 255, 0.48) 0px,
rgba(255, 255, 255, 0.48) 3px,
transparent 3px,
transparent 26px
);
border-radius: 99px;
z-index: 1;
}
/* Edge light dots — bottom row */
.rwy-edge-b {
position: absolute;
bottom: 5px;
left: 3%;
right: 3%;
height: 3px;
background: repeating-linear-gradient(
90deg,
rgba(255, 255, 255, 0.48) 0px,
rgba(255, 255, 255, 0.48) 3px,
transparent 3px,
transparent 26px
);
border-radius: 99px;
z-index: 1;
}
/* Green landing glow lights — overlay, hidden by default */
.rwy-glow-t,
.rwy-glow-b {
position: absolute;
left: 3%;
right: 3%;
height: 3px;
border-radius: 99px;
background: repeating-linear-gradient(
90deg,
rgba(121, 204, 149, 0.92) 0px,
rgba(121, 204, 149, 0.92) 3px,
transparent 3px,
transparent 26px
);
box-shadow: 0 0 6px rgba(121, 204, 149, 0.55);
opacity: 0;
z-index: 4;
}
.rwy-glow-t { top: 5px; }
.rwy-glow-b { bottom: 5px; }
/* Touchdown surface flash element */
.rwy-land-flash {
position: absolute;
inset: 0;
background: transparent;
opacity: 0;
z-index: 3;
pointer-events: none;
}
/* Landing scene — activate green edge lights */
.scene-card[data-scene="landing"] .rwy-glow-t,
.scene-card[data-scene="landing"] .rwy-glow-b {
animation: rwy-lights-on 0.7s ease-out 2.5s both;
}
/* Landing scene — brief touchdown flash */
.scene-card[data-scene="landing"] .rwy-land-flash {
animation: rwy-touchdown-flash 0.45s ease-out 2.3s forwards;
}
@keyframes rwy-lights-on {
from { opacity: 0; }
to { opacity: 1; }
}
@keyframes rwy-touchdown-flash {
0% { background: rgba(255, 255, 255, 0.22); opacity: 1; }
100% { background: transparent; opacity: 0; }
}
.beacon {
position: absolute;
left: 14%;
top: 36%;
width: 10px;
height: 10px;
border-radius: 50%;
background: var(--gold);
box-shadow: 0 0 14px rgba(197, 166, 106, 0.7);
}
.holding-ring {
position: absolute;
left: 18%;
top: 40%;
width: 18%;
aspect-ratio: 1;
transform: translate(-50%, -50%);
border-radius: 50%;
border: 1px dashed rgba(197, 166, 106, 0.28);
opacity: 0;
}
.flight-path { display: none; }
.flight-unit {
position: absolute;
left: 12%;
top: 62%;
width: clamp(122px, 17%, 190px);
transform: translate(-50%, -50%) rotate(-6deg);
transform-origin: 50% 50%;
filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.35));
z-index: 3;
}
.plane {
position: relative;
width: 100%;
}
.plane img {
display: block;
width: 100%;
height: auto;
}
.smoke,
.impact {
position: absolute;
opacity: 0;
pointer-events: none;
}
.smoke {
left: 16%;
top: 52%;
width: 66%;
aspect-ratio: 1;
transform: translate(-72%, -50%) scale(0.86);
border-radius: 50%;
background: radial-gradient(circle, rgba(255,255,255,0.36) 0%, rgba(203, 111, 102, 0.2) 38%, rgba(255,255,255,0.0) 72%);
}
.impact {
left: 88%;
top: 50%;
width: 28%;
aspect-ratio: 1;
transform: translate(-50%, -50%) scale(0.8);
border-radius: 50%;
background: radial-gradient(circle, rgba(255, 255, 255, 0.95) 0%, rgba(216, 162, 97, 0.92) 42%, rgba(203, 111, 102, 0.0) 72%);
}
.scene-card[data-scene="ready"] .flight-unit {
left: 12%;
top: 62%;
transform: translate(-50%, -50%) rotate(-4deg);
}
.scene-card[data-scene="inference"] .flight-unit {
animation: inference-flight 5s linear infinite;
}
.scene-card[data-scene="landing"] .flight-unit {
animation: landing-flight 3.6s ease-in-out forwards;
}
.scene-card[data-scene="approach"] .flight-unit {
animation: approach-flight 4.6s ease-in-out infinite;
}
.scene-card[data-scene="holding"] .flight-unit {
animation: holding-flight 5.4s linear infinite;
}
.scene-card[data-scene="holding"] .holding-ring {
opacity: 1;
}
.scene-card[data-scene="warning"] .flight-unit {
animation: warning-flight 2.2s ease-in-out infinite;
}
.scene-card[data-scene="warning"] .beacon {
background: var(--amber);
box-shadow: 0 0 18px rgba(216, 162, 97, 0.8);
animation: blink 0.75s steps(2, end) infinite;
}
.scene-card[data-scene="crash"] .flight-unit {
animation: crash-flight 2.8s ease-in forwards;
}
.scene-card[data-scene="crash"] .smoke {
opacity: 1;
animation: smoke-rise 1.8s ease-in-out infinite;
}
.scene-card[data-scene="crash"] .impact {
opacity: 1;
animation: flash 1.1s ease-in-out infinite;
}
.deck-note,
.ops-grid,
.summary-grid,
.strips,
.results-table,
.log-console {
margin-top: 18px;
}
.ops-grid,
.summary-grid {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 18px;
}
.mini-card,
.summary-card,
.strip {
border: 1px solid var(--line);
border-radius: 14px;
background: rgba(255, 255, 255, 0.02);
}
.mini-card,
.summary-card {
padding: 15px 16px;
}
.mini-card strong,
.summary-card strong {
display: block;
margin-top: 6px;
font-size: 22px;
font-family: var(--serif);
}
.mini-card span,
.summary-card span {
color: var(--muted);
font-size: 12px;
text-transform: uppercase;
letter-spacing: 0.12em;
font-family: var(--mono);
}
/* Link cards */
.mini-card.links-card { display: flex; flex-direction: column; gap: 8px; }
.mini-card.links-card span { margin-bottom: 2px; }
.link-row {
display: flex;
gap: 8px;
}
.link-btn {
display: inline-flex;
align-items: center;
gap: 7px;
padding: 8px 13px;
border-radius: 10px;
border: 1px solid var(--line);
background: rgba(255,255,255,0.03);
color: var(--text);
text-decoration: none;
font-family: var(--mono);
font-size: 12px;
font-weight: 500;
transition: border-color 150ms, background 150ms;
}
.link-btn:hover {
border-color: var(--gold);
background: rgba(197, 166, 106, 0.08);
color: var(--gold);
}
.link-btn svg { flex-shrink: 0; opacity: 0.85; }
.control-panel p,
.deck-note {
color: var(--muted);
font-size: 14px;
line-height: 1.7;
}
.field {
display: grid;
gap: 8px;
margin-bottom: 14px;
}
.field label {
color: var(--muted);
font-size: 12px;
text-transform: uppercase;
letter-spacing: 0.12em;
font-family: var(--mono);
}
.field input,
.field select {
width: 100%;
border: 1px solid var(--line);
border-radius: 12px;
background: #10161c;
color: var(--text);
padding: 13px 14px;
font: inherit;
}
.run-row {
display: flex;
gap: 10px;
flex-wrap: wrap;
align-items: center;
margin-top: 16px;
}
.run-button {
border: 0;
border-radius: 12px;
padding: 13px 18px;
background: var(--gold);
color: #11161c;
font-weight: 700;
font-family: var(--mono);
text-transform: uppercase;
letter-spacing: 0.1em;
cursor: pointer;
}
.run-button:disabled { opacity: 0.72; cursor: wait; }
.run-chip {
padding: 9px 12px;
border-radius: 999px;
border: 1px solid var(--line);
font-size: 12px;
font-family: var(--mono);
color: var(--muted);
background: #10161c;
}
.strips {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 18px;
}
.strip {
padding: 18px;
transition: border-color 180ms ease, transform 180ms ease;
}
.strip[data-state="running"] {
border-color: var(--gold);
transform: translateY(-1px);
}
.strip[data-state="success"] {
border-color: var(--green);
}
.strip[data-state="warning"] {
border-color: var(--amber);
}
.strip[data-state="danger"] {
border-color: var(--red);
}
.strip-top,
.strip-meta {
display: flex;
justify-content: space-between;
gap: 12px;
align-items: center;
}
.strip-title {
font-family: var(--serif);
font-size: 18px;
}
.strip-difficulty {
padding: 4px 8px;
border-radius: 999px;
font-family: var(--mono);
font-size: 11px;
text-transform: uppercase;
letter-spacing: 0.1em;
}
.strip-difficulty.easy { background: var(--green-soft); color: var(--green); }
.strip-difficulty.medium { background: var(--gold-soft); color: var(--gold); }
.strip-difficulty.hard { background: rgba(203, 111, 102, 0.12); color: var(--red); }
.strip-summary {
margin: 8px 0 14px;
color: var(--muted);
font-size: 14px;
}
.strip-meta {
font-family: var(--mono);
font-size: 12px;
color: var(--muted);
padding-top: 12px;
border-top: 1px solid var(--line-soft);
}
table {
width: 100%;
border-collapse: collapse;
}
th,
td {
padding: 13px 14px;
border-bottom: 1px solid var(--line-soft);
text-align: left;
font-size: 14px;
}
th {
color: var(--muted);
font-family: var(--mono);
font-size: 11px;
text-transform: uppercase;
letter-spacing: 0.12em;
}
td:last-child,
th:last-child {
text-align: right;
}
.log-console {
border: 1px solid var(--line);
border-radius: 14px;
background: #0f1419;
overflow: hidden;
}
.log-head {
display: flex;
justify-content: space-between;
gap: 12px;
align-items: center;
padding: 12px 14px;
border-bottom: 1px solid var(--line-soft);
font-family: var(--mono);
font-size: 12px;
color: var(--muted);
}
.log-output {
margin: 0;
padding: 16px;
min-height: 230px;
max-height: 340px;
overflow: auto;
white-space: pre-wrap;
word-break: break-word;
font-family: var(--mono);
font-size: 12px;
line-height: 1.72;
color: #d9e0e6;
}
.score-good { color: var(--green); }
.score-mid { color: var(--amber); }
.score-bad { color: var(--red); }
@keyframes pulse-dot {
0%, 100% { transform: scale(1); opacity: 0.82; }
50% { transform: scale(1.35); opacity: 1; }
}
@keyframes inference-flight {
0% { left: 12%; top: 62%; transform: translate(-50%, -50%) rotate(-5deg); }
35% { left: 36%; top: 40%; transform: translate(-50%, -50%) rotate(-9deg); }
70% { left: 64%; top: 48%; transform: translate(-50%, -50%) rotate(2deg); }
100% { left: 88%; top: 36%; transform: translate(-50%, -50%) rotate(-7deg); }
}
@keyframes landing-flight {
0% { left: 12%; top: 54%; transform: translate(-50%, -50%) rotate(-9deg); }
55% { left: 56%; top: 32%; transform: translate(-50%, -50%) rotate(-5deg); }
85% { left: 76%; top: 58%; transform: translate(-50%, -50%) rotate(-2deg); }
100% { left: 84%; top: 73%; transform: translate(-50%, -50%) rotate(3deg); }
}
@keyframes approach-flight {
0% { left: 14%; top: 56%; transform: translate(-50%, -50%) rotate(-8deg); }
50% { left: 54%; top: 41%; transform: translate(-50%, -50%) rotate(-2deg); }
100% { left: 86%; top: 63%; transform: translate(-50%, -50%) rotate(5deg); }
}
@keyframes holding-flight {
0% { left: 18%; top: 40%; transform: translate(-50%, -50%) rotate(0deg); }
25% { left: 28%; top: 27%; transform: translate(-50%, -50%) rotate(56deg); }
50% { left: 39%; top: 40%; transform: translate(-50%, -50%) rotate(148deg); }
75% { left: 28%; top: 53%; transform: translate(-50%, -50%) rotate(238deg); }
100% { left: 18%; top: 40%; transform: translate(-50%, -50%) rotate(320deg); }
}
@keyframes warning-flight {
0%, 100% { left: 24%; top: 48%; transform: translate(-50%, -50%) rotate(-4deg); }
25% { left: 42%; top: 36%; transform: translate(-50%, -50%) rotate(2deg); }
50% { left: 60%; top: 54%; transform: translate(-50%, -50%) rotate(9deg); }
75% { left: 78%; top: 40%; transform: translate(-50%, -50%) rotate(-10deg); }
}
@keyframes crash-flight {
0% { left: 22%; top: 46%; transform: translate(-50%, -50%) rotate(-2deg); }
40% { left: 58%; top: 50%; transform: translate(-50%, -50%) rotate(12deg); }
100% { left: 82%; top: 74%; transform: translate(-50%, -50%) rotate(52deg); }
}
@keyframes smoke-rise {
0% { transform: translate(-72%, -50%) scale(0.82); opacity: 0.55; }
100% { transform: translate(-88%, -86%) scale(1.16); opacity: 0.05; }
}
@keyframes flash {
0%, 100% { transform: translate(-50%, -50%) scale(0.7); opacity: 0.4; }
50% { transform: translate(-50%, -50%) scale(1.4); opacity: 1; }
}
@keyframes blink {
50% { opacity: 0.2; }
}
@media (max-width: 1100px) {
.main-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
.shell { width: min(100vw - 16px, 100%); }
.masthead { flex-direction: column; align-items: flex-start; }
.status-box { justify-items: start; }
.ops-grid,
.summary-grid,
.strips { grid-template-columns: 1fr; }
}
</style>
</head>
<body>
<div class="shell">
<header class="masthead">
<div>
<p class="eyebrow">ATC Optimization OpenEnv</p>
<h1>Inference Deck</h1>
<p class="lead">Classy, simple, and operational. Choose a model, supply an HF token if needed, and watch the aircraft scene react to the run outcome.</p>
</div>
<div class="status-box">
<div class="status-pill"><span class="status-dot"></span><span id="status-text">Console ready</span></div>
<div class="clock" id="clock">--:--:-- UTC</div>
</div>
</header>
<section class="main-grid">
<section class="panel">
<h2 class="section-title">Flight scene</h2>
<div class="scene-card" id="scene-card" data-scene="ready">
<div class="scene-header">
<div>
<strong id="scene-title">Ready for departure</strong>
<span id="scene-caption">Start a run and the aircraft will move into an inference scene, then settle into a matching outcome case.</span>
</div>
<div class="scene-badge" id="scene-badge">Standby</div>
</div>
<div class="scene-stage">
<div class="scene-stage-inner">
<svg class="flight-path" viewBox="0 0 760 250" preserveAspectRatio="none" aria-hidden="true">
<path d="M40 178 C170 96, 280 84, 420 120 S660 172, 720 128"></path>
</svg>
<div class="holding-ring"></div>
<div class="beacon"></div>
<div class="flight-unit" aria-hidden="true">
<div class="smoke"></div>
<div class="impact"></div>
<div class="plane">
<img src="__PLANE_IMAGE_SRC__" alt="Passenger aircraft">
</div>
</div>
</div>
<div class="scene-ground" aria-hidden="true"></div>
<div class="runway" aria-hidden="true">
<div class="rwy-number">09</div>
<div class="rwy-threshold"><span></span><span></span><span></span><span></span><span></span><span></span></div>
<div class="rwy-centerline"></div>
<div class="rwy-tdz"><span></span><span></span></div>
<div class="rwy-edge-t"></div>
<div class="rwy-edge-b"></div>
<div class="rwy-glow-t"></div>
<div class="rwy-glow-b"></div>
<div class="rwy-land-flash"></div>
</div>
</div>
</div>
<div class="ops-grid">
<div class="mini-card">
<span>OpenEnv endpoints</span>
<strong>POST /reset<br>POST /step<br>GET /state</strong>
</div>
<div class="mini-card links-card">
<span>Links</span>
<div class="link-row">
<a class="link-btn" href="https://github.com/GTsingh600/ats" target="_blank" rel="noreferrer">
<svg width="14" height="14" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.166 6.839 9.489.5.092.682-.217.682-.482 0-.237-.009-.868-.013-1.703-2.782.604-3.369-1.342-3.369-1.342-.454-1.154-1.11-1.462-1.11-1.462-.908-.62.069-.608.069-.608 1.003.07 1.531 1.03 1.531 1.03.892 1.529 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.11-4.555-4.943 0-1.091.39-1.984 1.029-2.683-.103-.253-.446-1.27.098-2.647 0 0 .84-.269 2.75 1.025A9.578 9.578 0 0 1 12 6.836a9.59 9.59 0 0 1 2.504.337c1.909-1.294 2.747-1.025 2.747-1.025.546 1.377.203 2.394.1 2.647.64.699 1.028 1.592 1.028 2.683 0 3.842-2.339 4.687-4.566 4.935.359.309.678.919.678 1.852 0 1.336-.012 2.415-.012 2.743 0 .267.18.578.688.48C19.138 20.163 22 16.418 22 12c0-5.523-4.477-10-10-10z"/></svg>
GitHub
</a>
<a class="link-btn" href="https://huggingface.co/spaces/GTsingh12/ATS-openenv" target="_blank" rel="noreferrer">
<svg width="14" height="14" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M12 2a10 10 0 1 0 0 20A10 10 0 0 0 12 2zm0 2a8 8 0 1 1 0 16A8 8 0 0 1 12 4zm-1 4v4H7l5 6 5-6h-4V8h-2z"/></svg>
HF Space
</a>
</div>
</div>
</div>
</section>
<aside class="panel control-panel">
<h2 class="section-title">Run inference</h2>
<p>Tokens are used for the current request only. If you select <strong>heuristic-baseline</strong>, no hosted model token is required.</p>
<form id="run-form">
<div class="field">
<label for="hf-token">HF token</label>
<input id="hf-token" type="password" placeholder="hf_xxx..." autocomplete="off" spellcheck="false">
</div>
<div class="field">
<label for="model-name">Model</label>
<select id="model-name">__MODEL_OPTIONS__</select>
</div>
<div class="run-row">
<button class="run-button" id="run-button" type="submit">Run inference</button>
<div class="run-chip" id="run-state">Idle</div>
<div class="run-chip" id="run-timer">00.00s</div>
</div>
</form>
<div class="deck-note" id="run-message">The board below will show task outcomes, scores, and raw logs as soon as the run completes.</div>
<div class="summary-grid">
<div class="summary-card">
<span>Average score</span>
<strong id="avg-score">--</strong>
</div>
<div class="summary-card">
<span>Improvement</span>
<strong id="avg-improvement">--</strong>
</div>
<div class="summary-card">
<span>Total runtime</span>
<strong id="runtime-seconds">--</strong>
</div>
<div class="summary-card">
<span>Model</span>
<strong id="model-used">--</strong>
</div>
</div>
</aside>
</section>
<section class="panel">
<h2 class="section-title">Task flight strips</h2>
<div class="strips" id="task-strips">__TASK_STRIPS__</div>
</section>
<section class="panel">
<h2 class="section-title">Task score table</h2>
<div class="results-table">
<table>
<thead>
<tr>
<th>Task</th>
<th>Difficulty</th>
<th>Baseline</th>
<th>Agent</th>
<th>Steps</th>
<th>Improvement</th>
</tr>
</thead>
<tbody id="results-body"></tbody>
</table>
</div>
</section>
<section class="panel">
<h2 class="section-title">Run log</h2>
<div class="log-console">
<div class="log-head">
<span>Structured output</span>
<span id="log-meta">Idle</span>
</div>
<pre class="log-output" id="log-output">System idle.
Select a model, run inference, and review the resulting flight case here.</pre>
</div>
</section>
</div>
<script>
const TASKS = __TASK_DATA__;
const form = document.getElementById("run-form");
const tokenInput = document.getElementById("hf-token");
const modelSelect = document.getElementById("model-name");
const runButton = document.getElementById("run-button");
const runState = document.getElementById("run-state");
const runTimer = document.getElementById("run-timer");
const runMessage = document.getElementById("run-message");
const statusText = document.getElementById("status-text");
const clock = document.getElementById("clock");
const sceneCard = document.getElementById("scene-card");
const sceneTitle = document.getElementById("scene-title");
const sceneCaption = document.getElementById("scene-caption");
const sceneBadge = document.getElementById("scene-badge");
const avgScore = document.getElementById("avg-score");
const avgImprovement = document.getElementById("avg-improvement");
const runtimeSeconds = document.getElementById("runtime-seconds");
const modelUsed = document.getElementById("model-used");
const resultsBody = document.getElementById("results-body");
const logOutput = document.getElementById("log-output");
const logMeta = document.getElementById("log-meta");
let timerHandle = null;
let stripHandle = null;
let startStamp = null;
const runningNarration = [
"Model is evaluating wake separation.",
"Balancing runway capacity against delay pressure.",
"Checking emergency priority overrides.",
"Scoring fairness and schedule completeness."
];
const scenePreviewMap = {
ready: ["Ready for departure", "Start a run and the aircraft will move into an inference scene, then settle into a matching outcome case.", "Standby"],
inference: ["Aircraft in flight", "The aircraft is actively moving while the model evaluates constraints and priorities.", "Inference"],
landing: ["Smooth landing", "The run scored strongly enough to end in a clean, controlled touchdown.", "Landing"],
approach: ["Controlled approach", "The model is lined up well, but it still shows a little operational roughness.", "Approach"],
holding: ["Holding pattern", "The aircraft remains safe, but the run is indecisive enough to keep it circling.", "Holding"],
warning: ["Turbulence warning", "The model output is unstable enough to show a visibly unsettled approach.", "Warning"],
crash: ["Loss of control", "The run quality fell apart badly enough to trigger the crash case.", "Crash"]
};
function tickClock() {
const now = new Date();
clock.textContent = now.toISOString().slice(11, 19) + " UTC";
}
function stripStateForScore(score) {
if (score >= 0.8) return "success";
if (score >= 0.5) return "warning";
return "danger";
}
function scoreClass(score) {
if (score >= 0.8) return "score-good";
if (score >= 0.5) return "score-mid";
return "score-bad";
}
function setScene(scene, title, caption, badge) {
sceneCard.dataset.scene = scene;
sceneTitle.textContent = title;
sceneCaption.textContent = caption;
sceneBadge.textContent = badge;
}
function resetTable() {
resultsBody.innerHTML = TASKS.map((task) => `
<tr>
<td>${task.title}</td>
<td>${task.difficulty}</td>
<td>${task.random_baseline.toFixed(2)}</td>
<td>--</td>
<td>--</td>
<td>--</td>
</tr>
`).join("");
}
function setStrip(taskId, state, scoreText) {
const strip = document.querySelector(`[data-task-id="${taskId}"]`);
if (!strip) return;
strip.dataset.state = state;
const scoreNode = strip.querySelector(".strip-score");
if (scoreNode) {
scoreNode.textContent = scoreText;
}
}
function startRunUi() {
resetTable();
TASKS.forEach((task) => setStrip(task.task_id, "ready", "Queued"));
runButton.disabled = true;
runButton.textContent = "Running...";
runState.textContent = "Active";
statusText.textContent = "Inference running";
logMeta.textContent = "Run active";
setScene("inference", "Aircraft in flight", "The plane is moving while the model works through separation, fairness, and priority logic.", "Inference");
startStamp = performance.now();
let narrationIndex = 0;
runMessage.textContent = runningNarration[narrationIndex];
timerHandle = window.setInterval(() => {
const elapsed = ((performance.now() - startStamp) / 1000).toFixed(2);
runTimer.textContent = `${elapsed}s`;
}, 80);
stripHandle = window.setInterval(() => {
const task = TASKS[narrationIndex % TASKS.length];
TASKS.forEach((item) => setStrip(item.task_id, "ready", "Queued"));
setStrip(task.task_id, "running", "In progress");
runMessage.textContent = runningNarration[narrationIndex % runningNarration.length];
narrationIndex += 1;
}, 900);
}
function stopRunUi() {
if (timerHandle) window.clearInterval(timerHandle);
if (stripHandle) window.clearInterval(stripHandle);
timerHandle = null;
stripHandle = null;
runButton.disabled = false;
runButton.textContent = "Run inference";
statusText.textContent = "Console ready";
}
function renderRun(payload) {
avgScore.textContent = payload.average_agent_score.toFixed(4);
avgScore.className = scoreClass(payload.average_agent_score);
avgImprovement.textContent = payload.average_improvement.toFixed(4);
avgImprovement.className = scoreClass(payload.average_improvement + 0.2);
runtimeSeconds.textContent = `${payload.total_runtime_seconds.toFixed(2)}s`;
modelUsed.textContent = payload.model;
runState.textContent = "Complete";
runMessage.textContent = `${payload.scene_title}. ${payload.scene_caption}`;
logMeta.textContent = `${payload.model} | ${payload.generated_at}`;
setScene(payload.scene, payload.scene_title, payload.scene_caption, payload.scene);
payload.tasks.forEach((task) => {
setStrip(task.task_id, stripStateForScore(task.score), `${task.outcome} | ${task.score.toFixed(4)}`);
});
resultsBody.innerHTML = payload.tasks.map((task) => `
<tr>
<td>${task.title}</td>
<td>${task.difficulty}</td>
<td>${task.random_baseline.toFixed(2)}</td>
<td class="${scoreClass(task.score)}">${task.score.toFixed(4)}</td>
<td>${task.steps_used}</td>
<td class="${scoreClass(task.improvement + 0.2)}">${task.improvement.toFixed(4)}</td>
</tr>
`).join("");
const lines = [];
payload.tasks.forEach((task) => {
lines.push(`=== ${task.title} (${task.outcome}) ===`);
task.logs.forEach((line) => lines.push(line));
if (task.stderr.length) {
lines.push("--- stderr ---");
task.stderr.forEach((line) => lines.push(line));
}
lines.push("");
});
logOutput.textContent = lines.join("\n").trim();
}
function renderFailure(message) {
runState.textContent = "Failed";
runMessage.textContent = message;
logMeta.textContent = "Run failed";
logOutput.textContent = `Run failed.\n\n${message}`;
setScene("crash", "Loss of control", message, "Error");
TASKS.forEach((task) => setStrip(task.task_id, "danger", "Run failed"));
}
form.addEventListener("submit", async (event) => {
event.preventDefault();
startRunUi();
try {
const response = await fetch("/ui/run-inference", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
hf_token: tokenInput.value.trim(),
model_name: modelSelect.value
})
});
const payload = await response.json();
if (!response.ok) {
throw new Error(payload.detail || "Inference request failed.");
}
renderRun(payload);
} catch (error) {
renderFailure(error.message || "Inference request failed.");
} finally {
stopRunUi();
}
});
tickClock();
window.setInterval(tickClock, 1000);
resetTable();
const previewScene = new URLSearchParams(window.location.search).get("scene");
if (previewScene && scenePreviewMap[previewScene]) {
const [title, caption, badge] = scenePreviewMap[previewScene];
setScene(previewScene, title, caption, badge);
runMessage.textContent = `Preview mode: ${caption}`;
runState.textContent = "Preview";
logMeta.textContent = `Preview | ${previewScene}`;
}
</script>
</body>
</html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ATC Optimization OpenEnv</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=Libre+Baskerville:wght@400;700&family=Source+Sans+3:wght@400;600;700&display=swap" rel="stylesheet">
<style>
:root {
--bg: #0d1318;
--panel: #151d24;
--panel-soft: #1b2530;
--line: #31404d;
--line-soft: rgba(255, 255, 255, 0.08);
--text: #edf1f5;
--muted: #a7b2bd;
--gold: #c5a66a;
--gold-soft: rgba(197, 166, 106, 0.14);
--blue: #8aa2b7;
--blue-soft: rgba(138, 162, 183, 0.16);
--green: #79cc95;
--green-soft: rgba(121, 204, 149, 0.16);
--amber: #d8a261;
--red: #cb6f66;
--mono: "IBM Plex Mono", monospace;
--body: "Source Sans 3", sans-serif;
--serif: "Libre Baskerville", serif;
}
* { box-sizing: border-box; }
body {
margin: 0;
background: linear-gradient(180deg, #0a0f14 0%, #0d1318 100%);
color: var(--text);
font-family: var(--body);
}
.shell {
width: min(1280px, calc(100vw - 28px));
margin: 0 auto;
padding: 22px 0 34px;
}
.masthead,
.panel {
border: 1px solid var(--line);
background: linear-gradient(180deg, rgba(22, 30, 37, 0.95), rgba(18, 24, 31, 0.98));
box-shadow: 0 18px 40px rgba(0, 0, 0, 0.24);
}
.masthead {
display: flex;
justify-content: space-between;
gap: 16px;
align-items: flex-end;
padding: 20px 24px;
border-radius: 18px;
margin-bottom: 18px;
}
.eyebrow {
margin: 0 0 10px;
color: var(--gold);
text-transform: uppercase;
letter-spacing: 0.24em;
font-size: 11px;
font-family: var(--mono);
}
h1 {
margin: 0 0 8px;
font-family: var(--serif);
font-size: clamp(34px, 5vw, 52px);
line-height: 1.02;
font-weight: 700;
}
.lead {
margin: 0;
max-width: 58ch;
color: var(--muted);
font-size: 15px;
line-height: 1.7;
}
.status-box {
display: grid;
gap: 10px;
min-width: 220px;
justify-items: end;
}
.status-pill {
display: inline-flex;
align-items: center;
gap: 10px;
padding: 9px 14px;
border-radius: 999px;