cltsangwork commited on
Commit
9ab0046
·
verified ·
1 Parent(s): 54244a2

whoops wrong previous update

Browse files
Files changed (1) hide show
  1. index.html +212 -332
index.html CHANGED
@@ -1,332 +1,212 @@
1
- :root {
2
- font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
3
- color: #111827;
4
- background: #f6f7fb;
5
- font-synthesis: none;
6
- }
7
-
8
- * { box-sizing: border-box; }
9
-
10
- body {
11
- margin: 0;
12
- min-height: 100vh;
13
- background: radial-gradient(circle at top, #ffffff 0%, #f6f7fb 45%, #eef1f7 100%);
14
- }
15
-
16
- button, input, select, textarea { font: inherit; }
17
-
18
- .page-shell {
19
- width: min(1180px, calc(100% - 32px));
20
- margin: 0 auto;
21
- padding: 28px 0 24px;
22
- }
23
-
24
- .guide-linkbar {
25
- display: flex;
26
- align-items: center;
27
- justify-content: space-between;
28
- flex-wrap: wrap;
29
- gap: 10px;
30
- margin: 0 0 24px;
31
- padding: 11px 15px;
32
- border: 1px solid #d6e3f4;
33
- border-radius: 14px;
34
- background: #edf5ff;
35
- color: #334965;
36
- font-size: .9rem;
37
- font-weight: 700;
38
- }
39
- .guide-linkbar a { display: inline-flex; align-items: center; gap: 5px; border-radius: 8px; color: #174f9e; font-weight: 800; text-decoration: none; }
40
- .guide-linkbar a:hover { text-decoration: underline; }
41
- .guide-linkbar a:focus-visible { outline: 3px solid #f7b844; outline-offset: 3px; }
42
-
43
- .hero { width: 100%; margin-bottom: 20px; }
44
- .eyebrow, .section-kicker {
45
- margin: 0 0 10px;
46
- font-size: .78rem;
47
- font-weight: 750;
48
- letter-spacing: .08em;
49
- text-transform: uppercase;
50
- color: #52627a;
51
- }
52
-
53
- h1 {
54
- margin: 0;
55
- font-size: clamp(2.35rem, 5vw, 4rem);
56
- line-height: 1;
57
- letter-spacing: -.045em;
58
- }
59
-
60
- .lede {
61
- max-width: 940px;
62
- margin: 14px 0 0;
63
- font-size: clamp(1.05rem, 2vw, 1.3rem);
64
- line-height: 1.5;
65
- color: #4b5563;
66
- }
67
-
68
- .lesson-strip { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
69
- .lesson-strip span {
70
- padding: 8px 11px;
71
- border: 1px solid #dfe4ec;
72
- border-radius: 999px;
73
- background: rgba(255,255,255,.76);
74
- color: #52627a;
75
- font-size: .86rem;
76
- }
77
- .lesson-strip b { margin-right: 4px; color: #111827; }
78
-
79
- .workspace {
80
- display: grid;
81
- grid-template-columns: minmax(280px, .72fr) minmax(0, 1.45fr);
82
- gap: 20px;
83
- align-items: start;
84
- }
85
-
86
- .card {
87
- border: 1px solid #e0e5ed;
88
- border-radius: 22px;
89
- background: rgba(255,255,255,.93);
90
- box-shadow: 0 18px 50px rgba(26,39,63,.08);
91
- }
92
-
93
- .controls, .result { padding: 24px; }
94
- .result { position: sticky; top: 16px; }
95
- .step { display: flex; gap: 13px; align-items: flex-start; }
96
- .step-number {
97
- display: grid;
98
- place-items: center;
99
- width: 28px;
100
- height: 28px;
101
- flex: 0 0 28px;
102
- border-radius: 50%;
103
- background: #111827;
104
- color: #fff;
105
- font-size: .82rem;
106
- font-weight: 750;
107
- }
108
-
109
- .grow { flex: 1; min-width: 0; }
110
- .control-label { font-weight: 700; }
111
- .helper { margin: 6px 0 0; color: #667085; font-size: .92rem; line-height: 1.5; }
112
- .sample-title { margin: 0; }
113
- .sample-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
114
- .shuffle-button {
115
- flex: 0 0 auto;
116
- padding: 7px 10px;
117
- border: 1px solid #d8dee8;
118
- border-radius: 10px;
119
- background: #fff;
120
- color: #344054;
121
- cursor: pointer;
122
- font-size: .82rem;
123
- font-weight: 700;
124
- }
125
- .shuffle-button:hover:not(:disabled) { background: #f7f8fa; }
126
- .shuffle-button:disabled { opacity: .45; cursor: not-allowed; }
127
- .input-kicker {
128
- margin: 0 0 4px;
129
- color: #344054;
130
- font-size: .78rem;
131
- font-weight: 800;
132
- letter-spacing: .04em;
133
- text-transform: uppercase;
134
- }
135
- .example-head { margin-top: 18px; }
136
-
137
- .sample-grid {
138
- display: grid;
139
- grid-template-columns: repeat(2, minmax(0, 1fr));
140
- gap: 10px;
141
- margin-top: 12px;
142
- }
143
- .sample-card {
144
- min-width: 0;
145
- padding: 0;
146
- overflow: hidden;
147
- border: 1px solid #e0e5ed;
148
- border-radius: 12px;
149
- background: #fff;
150
- cursor: pointer;
151
- text-align: left;
152
- transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
153
- }
154
- .sample-card:hover { transform: translateY(-1px); border-color: #aeb8c6; box-shadow: 0 8px 18px rgba(26,39,63,.08); }
155
- .sample-card.selected { border-color: #111827; box-shadow: 0 0 0 2px #111827; }
156
- .sample-card img { display: block; width: 100%; aspect-ratio: 4/3; object-fit: cover; background: #eef1f5; }
157
- .sample-card span {
158
- display: block;
159
- padding: 8px 9px 9px;
160
- overflow: hidden;
161
- color: #475467;
162
- font-size: .78rem;
163
- font-weight: 700;
164
- text-overflow: ellipsis;
165
- white-space: nowrap;
166
- }
167
- .sample-card small { display: block; padding: 0 9px 9px; color: #8a94a4; font-size: .67rem; line-height: 1.2; letter-spacing: .01em; }
168
-
169
- .or-row { display: flex; align-items: center; gap: 10px; margin: 18px 0 14px; color: #98a2b3; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; }
170
- .or-row::before, .or-row::after { content: ''; height: 1px; flex: 1; background: #eceff4; }
171
- .file-input { width: 100%; margin-top: 16px; padding: 11px; border: 1px dashed #bac3d2; border-radius: 14px; background: #fafbfc; }
172
- .divider { height: 1px; margin: 22px 0; background: #eceff4; }
173
- .model-pair {
174
- display: grid;
175
- grid-template-columns: repeat(3, minmax(0, 1fr));
176
- gap: 12px;
177
- margin-top: 10px;
178
- }
179
- .model-field { min-width: 0; }
180
- .model-sub-label { display: block; margin-bottom: 6px; }
181
- .model-select, textarea {
182
- width: 100%;
183
- margin-top: 0;
184
- padding: 11px 12px;
185
- border: 1px solid #cfd7e3;
186
- border-radius: 12px;
187
- background: #fff;
188
- color: #111827;
189
- }
190
- .model-select:focus, textarea:focus { outline: 2px solid #111827; outline-offset: 2px; }
191
- .clip-controls { margin-top: 18px; }
192
- textarea { resize: vertical; line-height: 1.45; }
193
- .slider-row { display: flex; justify-content: space-between; gap: 12px; }
194
- #top-k-value { min-width: 48px; text-align: right; color: #334155; font-variant-numeric: tabular-nums; }
195
- #top-k { width: 100%; margin-top: 13px; accent-color: #111827; }
196
-
197
- .run-button {
198
- width: 100%;
199
- margin-top: 24px;
200
- padding: 13px 18px;
201
- border: 0;
202
- border-radius: 14px;
203
- background: #111827;
204
- color: #fff;
205
- font-weight: 750;
206
- cursor: pointer;
207
- transition: transform .15s ease, opacity .15s ease;
208
- }
209
- .run-button:not(:disabled):hover { transform: translateY(-1px); }
210
- .run-button:disabled { opacity: .38; cursor: not-allowed; }
211
- .status { min-height: 1.4em; margin: 14px 0 0; color: #52627a; font-size: .9rem; }
212
- .progress-wrap { height: 5px; margin-top: 10px; overflow: hidden; border-radius: 999px; background: #edf0f5; }
213
- .progress-bar { width: 0; height: 100%; border-radius: inherit; background: #111827; transition: width .2s ease; }
214
-
215
- .result-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin-bottom: 16px; }
216
- .result h2 { margin: 0; font-size: 1.35rem; letter-spacing: -.02em; }
217
- .badge { padding: 7px 10px; border-radius: 999px; background: #eef2f7; color: #536176; font-size: .82rem; font-weight: 700; white-space: nowrap; }
218
- .badge.ready { background: #e8f7ef; color: #17623c; }
219
- .badge.running { background: #fff4df; color: #805600; }
220
- .badge.error { background: #fdecec; color: #9b2c2c; }
221
-
222
- .preview-wrap {
223
- position: relative;
224
- display: grid;
225
- place-items: center;
226
- min-height: 360px;
227
- overflow: hidden;
228
- border-radius: 16px;
229
- background: #101318;
230
- }
231
- #preview-image { display: block; max-width: 100%; max-height: 560px; object-fit: contain; }
232
- .preview-wrap.empty #preview-image { display: none; }
233
- #preview-placeholder { margin: 0; padding: 32px; color: #9aa4b2; text-align: center; }
234
- .preview-wrap:not(.empty) #preview-placeholder { display: none; }
235
- .summary { margin: 16px 0; padding: 13px 15px; border-radius: 13px; background: #f7f8fa; color: #344054; font-weight: 650; line-height: 1.5; }
236
- .comparison-grid {
237
- display: grid;
238
- grid-template-columns: repeat(3, minmax(0, 1fr));
239
- gap: 14px;
240
- margin-top: 18px;
241
- }
242
- .comparison-panel {
243
- padding: 16px;
244
- border: 1px solid #e8ebf0;
245
- border-radius: 16px;
246
- background: #fafbfc;
247
- }
248
- .comparison-header {
249
- display: flex;
250
- align-items: center;
251
- justify-content: space-between;
252
- gap: 8px;
253
- margin-bottom: 12px;
254
- }
255
- .comparison-header h3 { margin: 0; font-size: 1rem; letter-spacing: -.01em; }
256
- .panel-pill {
257
- display: inline-flex;
258
- align-items: center;
259
- justify-content: center;
260
- width: 26px;
261
- height: 26px;
262
- border-radius: 50%;
263
- background: #111827;
264
- color: #fff;
265
- font-size: .72rem;
266
- font-weight: 800;
267
- }
268
- .comparison-summary {
269
- margin-bottom: 12px;
270
- color: #344054;
271
- font-weight: 650;
272
- line-height: 1.55;
273
- }
274
- .table-wrap.compact { border-radius: 12px; }
275
- .run-meta {
276
- display: grid;
277
- grid-template-columns: repeat(3, minmax(0, 1fr));
278
- gap: 8px;
279
- margin: -5px 0 16px;
280
- }
281
- .run-meta[hidden] { display: none; }
282
- .run-meta > span { min-width: 0; padding: 9px 10px; border: 1px solid #e8ebf0; border-radius: 11px; background: #fff; }
283
- .run-meta b { display: block; margin-bottom: 3px; color: #7a8595; font-size: .7rem; letter-spacing: .05em; text-transform: uppercase; }
284
- .run-meta span span { display: block; overflow: hidden; color: #344054; font-size: .82rem; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
285
- .table-wrap { overflow-x: auto; border: 1px solid #e8ebf0; border-radius: 14px; }
286
- table { width: 100%; border-collapse: collapse; font-size: .9rem; }
287
- th, td { padding: 11px 13px; border-bottom: 1px solid #edf0f4; text-align: left; vertical-align: top; }
288
- th { background: #fafbfc; color: #52627a; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; }
289
- tbody tr:last-child td { border-bottom: 0; }
290
- .empty-row td { color: #7d899a; text-align: center; }
291
- .score-wrap { display: grid; grid-template-columns: 58px minmax(70px, 1fr); gap: 9px; align-items: center; font-variant-numeric: tabular-nums; }
292
- .score-track { display: block; height: 7px; overflow: hidden; border-radius: 999px; background: #edf0f5; }
293
- .score-fill { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #111827, #5e6c84); }
294
-
295
- .explain { margin-top: 16px; padding: 18px 24px; }
296
- .explain-title { margin: 0; font-size: clamp(1.15rem, 1.8vw, 1.45rem); line-height: 1.25; letter-spacing: -.02em; }
297
- .explain-copy { margin: 10px 0 14px; color: #536176; line-height: 1.55; }
298
- .flow { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-weight: 700; }
299
- .flow span:not(.arrow) { padding: 8px 11px; border-radius: 10px; background: #f2f4f7; }
300
- .arrow { color: #98a2b3; }
301
- .extension-note { margin: 12px 0 0; padding-top: 11px; border-top: 1px solid #eceff4; color: #5d6879; font-size: .92rem; line-height: 1.5; }
302
- .history { margin-top: 16px; padding: 20px 24px 24px; }
303
- .history-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; margin-bottom: 15px; }
304
- .history-copy { margin: 8px 0 0; color: #5d6879; font-size: .92rem; line-height: 1.5; }
305
- .secondary-button { flex: 0 0 auto; padding: 9px 12px; border: 1px solid #cfd7e3; border-radius: 11px; background: #fff; color: #344054; font-weight: 700; cursor: pointer; }
306
- .secondary-button:hover:not(:disabled) { border-color: #8f9bad; }
307
- .secondary-button:disabled { opacity: .45; cursor: not-allowed; }
308
- .runtime-note { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin-top: 16px; overflow: hidden; background: #e5e9f0; }
309
- .runtime-note div { padding: 16px 18px; background: rgba(255,255,255,.96); }
310
- .runtime-note b { display: block; margin-bottom: 5px; color: #111827; font-size: .88rem; }
311
- .runtime-note span { color: #667085; font-size: .84rem; line-height: 1.45; }
312
- footer { padding: 14px 2px 0; color: #7a8595; font-size: .84rem; }
313
-
314
- @media (max-width: 820px) {
315
- .page-shell { width: min(100% - 20px, 720px); padding: 22px 0 20px; }
316
- .workspace { grid-template-columns: 1fr; }
317
- .result { position: static; }
318
- .preview-wrap { min-height: 280px; }
319
- .runtime-note { grid-template-columns: 1fr; }
320
- }
321
-
322
- @media (max-width: 520px) {
323
- .card { border-radius: 17px; }
324
- .controls, .result, .explain, .history { padding: 18px; }
325
- .result-head { align-items: center; }
326
- .comparison-grid { grid-template-columns: 1fr; }
327
- .model-pair { grid-template-columns: 1fr; }
328
- .run-meta { grid-template-columns: 1fr; }
329
- .history-head { display: block; }
330
- .secondary-button { margin-top: 12px; }
331
- th, td { padding: 9px 10px; }
332
- }
 
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1">
6
+ <meta name="description" content="AI-Powered Image Classification mini-lab using pretrained Hugging Face models">
7
+ <title>AI-Powered Image Classification</title>
8
+ <link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>🖼️</text></svg>">
9
+ <link rel="stylesheet" href="./style.css?v=4">
10
+ </head>
11
+ <body>
12
+ <main class="page-shell">
13
+ <nav class="guide-linkbar" aria-label="Course guide">
14
+ <span>Building your own AI mini app?</span>
15
+ <a href="./how-to-start.html">How to Start <span aria-hidden="true">→</span></a>
16
+ </nav>
17
+
18
+ <header class="hero">
19
+ <p class="eyebrow">Creative Technology · Computer Vision</p>
20
+ <h1>AI-Powered Image Classification</h1>
21
+ <p class="lede">Pick a tested example or upload your own image. Then choose a pretrained classifier and let AI answer: <strong>what is this image mainly about?</strong></p>
22
+ <div class="lesson-strip" aria-label="Mini-lab overview">
23
+ <span><b>Task</b> Image classification</span>
24
+ <span><b>Data</b> ImageNet labels or custom candidates</span>
25
+ <span><b>Models</b> ResNet · ViT · CLIP</span>
26
+ </div>
27
+ </header>
28
+
29
+ <section class="workspace" aria-label="Image classification mini-lab">
30
+ <div class="controls card">
31
+ <div class="step">
32
+ <span class="step-number">1</span>
33
+ <div>
34
+ <p class="control-label sample-title">Choose an image</p>
35
+ <p class="helper">Start with a tested example, or try a photo of your own.</p>
36
+ </div>
37
+ </div>
38
+
39
+ <div class="sample-head example-head">
40
+ <div>
41
+ <p class="input-kicker">Start here · Example images</p>
42
+ <p class="helper">Four images are drawn at random from example images.</p>
43
+ </div>
44
+ <button id="shuffle-examples" class="shuffle-button" type="button">Shuffle</button>
45
+ </div>
46
+ <div id="sample-grid" class="sample-grid" aria-label="Example images"></div>
47
+ <div class="or-row"><span>or try your own</span></div>
48
+ <label class="control-label" for="image-input">Upload an image</label>
49
+ <p class="helper">PNG, JPEG, or WebP works best.</p>
50
+ <input id="image-input" class="file-input" type="file" accept="image/png,image/jpeg,image/webp">
51
+
52
+ <div class="divider"></div>
53
+
54
+ <div class="step">
55
+ <span class="step-number">2</span>
56
+ <div class="grow">
57
+ <label class="control-label">Choose the classifiers to compare</label>
58
+ <div class="model-pair">
59
+ <div class="model-field">
60
+ <label class="control-label model-sub-label" for="model-select-a">Model A</label>
61
+ <select id="model-select-a" class="model-select"></select>
62
+ <p id="model-note-a" class="helper"></p>
63
+ </div>
64
+ <div class="model-field">
65
+ <label class="control-label model-sub-label" for="model-select-b">Model B</label>
66
+ <select id="model-select-b" class="model-select"></select>
67
+ <p id="model-note-b" class="helper"></p>
68
+ </div>
69
+ <div class="model-field">
70
+ <label class="control-label model-sub-label" for="model-select-c">Model C</label>
71
+ <select id="model-select-c" class="model-select"></select>
72
+ <p id="model-note-c" class="helper"></p>
73
+ </div>
74
+ </div>
75
+ <div id="clip-controls" class="clip-controls" hidden>
76
+ <label class="control-label" for="candidate-labels">CLIP candidate labels</label>
77
+ <textarea id="candidate-labels" rows="3" spellcheck="false">a cat, a cup of coffee, a rocket, an astronaut, a dog, a car</textarea>
78
+ <p class="helper">Use 2–20 short descriptions, separated by commas or new lines.</p>
79
+ </div>
80
+ </div>
81
+ </div>
82
+
83
+ <div class="divider"></div>
84
+
85
+ <div class="step">
86
+ <span class="step-number">3</span>
87
+ <div class="grow">
88
+ <div class="slider-row">
89
+ <label class="control-label" for="top-k">Predictions to display</label>
90
+ <output id="top-k-value" for="top-k">5</output>
91
+ </div>
92
+ <input id="top-k" type="range" min="1" max="10" value="5" step="1">
93
+ <p class="helper">Top-k changes how many high-scoring labels are shown.</p>
94
+ </div>
95
+ </div>
96
+
97
+ <button id="run-button" class="run-button" type="button" disabled>Run 3-Model Comparison</button>
98
+ <p id="status" class="status" aria-live="polite">Choose an example or upload your own image.</p>
99
+ <div id="progress-wrap" class="progress-wrap" hidden>
100
+ <div id="progress-bar" class="progress-bar"></div>
101
+ </div>
102
+ </div>
103
+
104
+ <div class="result card">
105
+ <div class="result-head">
106
+ <div>
107
+ <p class="section-kicker">AI prediction</p>
108
+ <h2>What did the classifier predict?</h2>
109
+ </div>
110
+ <span id="runtime-badge" class="badge">Waiting</span>
111
+ </div>
112
+ <div id="preview-wrap" class="preview-wrap empty">
113
+ <img id="preview-image" alt="Selected image">
114
+ <p id="preview-placeholder">Choose an image first. It will appear here before classification.</p>
115
+ </div>
116
+
117
+ <div id="summary" class="summary">No predictions yet.</div>
118
+
119
+ <div id="run-meta" class="run-meta" hidden>
120
+ <span><b>Models</b><span id="meta-model">—</span></span>
121
+ <span><b>Image</b><span id="meta-image">—</span></span>
122
+ <span><b>Runtime</b><span id="meta-runtime">—</span></span>
123
+ </div>
124
+
125
+ <div id="comparison-grid" class="comparison-grid">
126
+ <div class="comparison-panel">
127
+ <div class="comparison-header">
128
+ <h3 id="model-a-name">Model A</h3>
129
+ <span class="panel-pill">A</span>
130
+ </div>
131
+ <div id="summary-a" class="comparison-summary">No predictions yet.</div>
132
+ <div class="table-wrap compact">
133
+ <table>
134
+ <thead><tr><th>Rank</th><th>Label</th><th>Score</th></tr></thead>
135
+ <tbody id="predictions-body-a">
136
+ <tr class="empty-row"><td colspan="3">Run all three models to compare details.</td></tr>
137
+ </tbody>
138
+ </table>
139
+ </div>
140
+ </div>
141
+
142
+ <div class="comparison-panel">
143
+ <div class="comparison-header">
144
+ <h3 id="model-b-name">Model B</h3>
145
+ <span class="panel-pill">B</span>
146
+ </div>
147
+ <div id="summary-b" class="comparison-summary">No predictions yet.</div>
148
+ <div class="table-wrap compact">
149
+ <table>
150
+ <thead><tr><th>Rank</th><th>Label</th><th>Score</th></tr></thead>
151
+ <tbody id="predictions-body-b">
152
+ <tr class="empty-row"><td colspan="3">Run all three models to compare details.</td></tr>
153
+ </tbody>
154
+ </table>
155
+ </div>
156
+ </div>
157
+
158
+ <div class="comparison-panel">
159
+ <div class="comparison-header">
160
+ <h3 id="model-c-name">Model C</h3>
161
+ <span class="panel-pill">C</span>
162
+ </div>
163
+ <div id="summary-c" class="comparison-summary">No predictions yet.</div>
164
+ <div class="table-wrap compact">
165
+ <table>
166
+ <thead><tr><th>Rank</th><th>Label</th><th>Score</th></tr></thead>
167
+ <tbody id="predictions-body-c">
168
+ <tr class="empty-row"><td colspan="3">Run all three models to compare details.</td></tr>
169
+ </tbody>
170
+ </table>
171
+ </div>
172
+ </div>
173
+ </div>
174
+ </div>
175
+ </section>
176
+
177
+ <section class="explain card">
178
+ <p class="section-kicker">What you are doing</p>
179
+ <h2 class="explain-title">Use a learned AI capability instead of rebuilding the traditional task from scratch.</h2>
180
+ <p class="explain-copy">ResNet and ViT choose from 1,000 fixed ImageNet classes. CLIP compares the image with descriptions that you provide. Keep the image fixed, change one setting, and explain why the output changes.</p>
181
+ <div class="flow" aria-label="Image classification flow">
182
+ <span>Example or your image</span><span class="arrow">→</span>
183
+ <span>Selected pretrained classifier</span><span class="arrow">→</span>
184
+ <span>Labels + scores</span>
185
+ </div>
186
+ <p class="extension-note"><strong>Compare models:</strong> keep the image fixed, switch classifier, and observe how labels, scores, and speed change.</p>
187
+ </section>
188
+
189
+ <section class="history card" aria-labelledby="history-title">
190
+ <div class="history-head">
191
+ <div>
192
+ <p class="section-kicker">Comparison log</p>
193
+ <h2 id="history-title" class="explain-title">Keep one image fixed and compare model decisions.</h2>
194
+ <p class="history-copy">Each successful run is added below. This makes the classroom comparison visible without reloading the page.</p>
195
+ </div>
196
+ <button id="clear-history" class="secondary-button" type="button" disabled>Clear log</button>
197
+ </div>
198
+ <div class="table-wrap">
199
+ <table>
200
+ <thead><tr><th>Run</th><th>Image</th><th>Model</th><th>Top prediction</th><th>Score</th><th>Time</th></tr></thead>
201
+ <tbody id="history-body">
202
+ <tr class="empty-row"><td colspan="6">Run three models on the same image to start a comparison.</td></tr>
203
+ </tbody>
204
+ </table>
205
+ </div>
206
+ </section>
207
+
208
+ <footer>Hosted as a Hugging Face Static Space · Powered by Transformers.js</footer>
209
+ </main>
210
+ <script type="module" src="./app.js?v=5"></script>
211
+ </body>
212
+ </html>