Spaces:
Sleeping
Sleeping
refactor: polish demo page copy
Browse files- web/templates/index.html +15 -14
web/templates/index.html
CHANGED
|
@@ -27,7 +27,7 @@
|
|
| 27 |
.layout {
|
| 28 |
min-height: 100vh;
|
| 29 |
display: grid;
|
| 30 |
-
grid-template-columns:
|
| 31 |
}
|
| 32 |
.sidebar {
|
| 33 |
background: var(--panel);
|
|
@@ -41,8 +41,9 @@
|
|
| 41 |
margin-top: 0;
|
| 42 |
}
|
| 43 |
h1 {
|
| 44 |
-
font-size: 1.
|
| 45 |
margin-bottom: 8px;
|
|
|
|
| 46 |
}
|
| 47 |
.muted {
|
| 48 |
color: var(--muted);
|
|
@@ -126,10 +127,10 @@
|
|
| 126 |
<body>
|
| 127 |
<div class="layout">
|
| 128 |
<aside class="sidebar">
|
| 129 |
-
<h1>Rossmann Forecast Demo</h1>
|
| 130 |
<p class="muted">
|
| 131 |
-
|
| 132 |
-
|
| 133 |
</p>
|
| 134 |
|
| 135 |
<form id="prediction-form">
|
|
@@ -166,7 +167,7 @@
|
|
| 166 |
<option value="1">Yes</option>
|
| 167 |
</select>
|
| 168 |
|
| 169 |
-
<button type="submit">
|
| 170 |
</form>
|
| 171 |
|
| 172 |
<p id="status" class="status">Waiting for input.</p>
|
|
@@ -174,10 +175,10 @@
|
|
| 174 |
|
| 175 |
<main class="main">
|
| 176 |
<div class="card">
|
| 177 |
-
<h2>
|
| 178 |
<p class="muted">
|
| 179 |
-
|
| 180 |
-
time-based evaluation,
|
| 181 |
</p>
|
| 182 |
</div>
|
| 183 |
|
|
@@ -192,15 +193,15 @@
|
|
| 192 |
<section class="card">
|
| 193 |
<h3>Top model contributions</h3>
|
| 194 |
<p class="muted">
|
| 195 |
-
These
|
| 196 |
-
are not causal
|
| 197 |
</p>
|
| 198 |
<div id="drivers" class="list"></div>
|
| 199 |
</section>
|
| 200 |
</div>
|
| 201 |
|
| 202 |
<section class="card">
|
| 203 |
-
<h3>Forecast
|
| 204 |
<div class="chart-wrap">
|
| 205 |
<canvas id="forecast-chart"></canvas>
|
| 206 |
</div>
|
|
@@ -246,7 +247,7 @@
|
|
| 246 |
maximumFractionDigits: 2
|
| 247 |
});
|
| 248 |
document.getElementById("summary").textContent =
|
| 249 |
-
`
|
| 250 |
|
| 251 |
const drivers = document.getElementById("drivers");
|
| 252 |
drivers.innerHTML = "";
|
|
@@ -258,7 +259,7 @@
|
|
| 258 |
});
|
| 259 |
|
| 260 |
updateChart(data.Forecast);
|
| 261 |
-
statusEl.textContent = "Forecast
|
| 262 |
} catch (error) {
|
| 263 |
statusEl.textContent = error.message;
|
| 264 |
}
|
|
|
|
| 27 |
.layout {
|
| 28 |
min-height: 100vh;
|
| 29 |
display: grid;
|
| 30 |
+
grid-template-columns: 360px 1fr;
|
| 31 |
}
|
| 32 |
.sidebar {
|
| 33 |
background: var(--panel);
|
|
|
|
| 41 |
margin-top: 0;
|
| 42 |
}
|
| 43 |
h1 {
|
| 44 |
+
font-size: 1.95rem;
|
| 45 |
margin-bottom: 8px;
|
| 46 |
+
line-height: 1.05;
|
| 47 |
}
|
| 48 |
.muted {
|
| 49 |
color: var(--muted);
|
|
|
|
| 127 |
<body>
|
| 128 |
<div class="layout">
|
| 129 |
<aside class="sidebar">
|
| 130 |
+
<h1>Rossmann Sales Forecast Demo</h1>
|
| 131 |
<p class="muted">
|
| 132 |
+
Use a store ID and a few scenario inputs to generate a short sales forecast. Store
|
| 133 |
+
metadata is loaded automatically from <code>store.csv</code>.
|
| 134 |
</p>
|
| 135 |
|
| 136 |
<form id="prediction-form">
|
|
|
|
| 167 |
<option value="1">Yes</option>
|
| 168 |
</select>
|
| 169 |
|
| 170 |
+
<button type="submit">Generate forecast</button>
|
| 171 |
</form>
|
| 172 |
|
| 173 |
<p id="status" class="status">Waiting for input.</p>
|
|
|
|
| 175 |
|
| 176 |
<main class="main">
|
| 177 |
<div class="card">
|
| 178 |
+
<h2>What this demo shows</h2>
|
| 179 |
<p class="muted">
|
| 180 |
+
This demo sends a small request to the prediction API and returns a short sales
|
| 181 |
+
forecast based on feature engineering, time-based evaluation, and a saved model.
|
| 182 |
</p>
|
| 183 |
</div>
|
| 184 |
|
|
|
|
| 193 |
<section class="card">
|
| 194 |
<h3>Top model contributions</h3>
|
| 195 |
<p class="muted">
|
| 196 |
+
These values show which features influenced the prediction most in the
|
| 197 |
+
model output space. They are descriptive, not causal.
|
| 198 |
</p>
|
| 199 |
<div id="drivers" class="list"></div>
|
| 200 |
</section>
|
| 201 |
</div>
|
| 202 |
|
| 203 |
<section class="card">
|
| 204 |
+
<h3>Forecast over time</h3>
|
| 205 |
<div class="chart-wrap">
|
| 206 |
<canvas id="forecast-chart"></canvas>
|
| 207 |
</div>
|
|
|
|
| 247 |
maximumFractionDigits: 2
|
| 248 |
});
|
| 249 |
document.getElementById("summary").textContent =
|
| 250 |
+
`${data.Forecast.length}-day forecast for Store ${data.Store} starting on ${data.Date}.`;
|
| 251 |
|
| 252 |
const drivers = document.getElementById("drivers");
|
| 253 |
drivers.innerHTML = "";
|
|
|
|
| 259 |
});
|
| 260 |
|
| 261 |
updateChart(data.Forecast);
|
| 262 |
+
statusEl.textContent = "Forecast ready.";
|
| 263 |
} catch (error) {
|
| 264 |
statusEl.textContent = error.message;
|
| 265 |
}
|