YOUSEF2434 commited on
Commit
84624f1
Β·
verified Β·
1 Parent(s): 5b5b8a5

Update Lab-Selection.html

Browse files
Files changed (1) hide show
  1. Lab-Selection.html +1248 -1227
Lab-Selection.html CHANGED
@@ -1,1227 +1,1248 @@
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.0">
6
- <title>AI STEM Lab</title>
7
- <style>
8
- :root {
9
- /* Dark Mode Variables */
10
- --bg-color: #121212;
11
- --card-bg: #1e1e1e;
12
- --accent-color: #0a84ff; /* Apple-style vibrant blue */
13
- --accent-hover: #409cff;
14
- --text-main: #f5f5f7;
15
- --text-secondary: #a1a1a6;
16
-
17
- /* Window Colors */
18
- --mac-window-bg: #2c2c2e;
19
- --mac-header-bg: #3a3a3c;
20
- --mac-border: rgba(0, 0, 0, 0.5);
21
- }
22
-
23
- body {
24
- font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
25
- background-color: var(--bg-color);
26
- color: var(--text-main);
27
- margin: 0;
28
- display: flex;
29
- flex-direction: column;
30
- align-items: center;
31
- justify-content: center;
32
- min-height: 100vh;
33
- padding: 20px;
34
- }
35
-
36
- /* Playground Header */
37
- header {
38
- margin-bottom: 50px;
39
- text-align: center;
40
- max-width: 800px;
41
- }
42
-
43
- h1 {
44
- color: var(--text-main);
45
- font-weight: 800;
46
- font-size: 3rem;
47
- margin: 0 0 15px 0;
48
- letter-spacing: -0.03em;
49
- background: linear-gradient(90deg, #fff, #a1a1a6);
50
- -webkit-background-clip: text;
51
- -webkit-text-fill-color: transparent;
52
- }
53
-
54
- p.subtitle {
55
- color: var(--text-secondary);
56
- font-size: 1.3rem;
57
- line-height: 1.5;
58
- }
59
-
60
- /* Card Container */
61
- .playground-grid {
62
- display: grid;
63
- grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
64
- gap: 30px;
65
- width: 95%;
66
- max-width: 1400px;
67
- }
68
-
69
- /* Lab Cards */
70
- .card {
71
- background: var(--card-bg);
72
- border-radius: 24px;
73
- padding: 40px;
74
- box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
75
- transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease;
76
- display: flex;
77
- flex-direction: column;
78
- align-items: flex-start;
79
- border: 1px solid rgba(255,255,255,0.08);
80
- position: relative;
81
- overflow: hidden;
82
- }
83
-
84
- .card:hover {
85
- transform: translateY(-8px);
86
- box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
87
- border-color: rgba(255,255,255,0.2);
88
- }
89
-
90
- .card::before {
91
- content: '';
92
- position: absolute;
93
- top: 0;
94
- left: 0;
95
- width: 100%;
96
- height: 6px;
97
- background: linear-gradient(90deg, var(--accent-color), #bc52ff);
98
- opacity: 0.7;
99
- }
100
-
101
- .icon-box {
102
- width: 64px;
103
- height: 64px;
104
- background: rgba(255, 255, 255, 0.1);
105
- border-radius: 16px;
106
- display: flex;
107
- align-items: center;
108
- justify-content: center;
109
- font-size: 32px;
110
- margin-bottom: 25px;
111
- }
112
-
113
- .card h2 {
114
- margin: 0 0 15px 0;
115
- font-size: 1.8rem;
116
- font-weight: 700;
117
- color: var(--text-main);
118
- }
119
-
120
- .card p {
121
- margin: 0 0 30px 0;
122
- color: var(--text-secondary);
123
- line-height: 1.6;
124
- font-size: 1.1rem;
125
- flex-grow: 1;
126
- }
127
-
128
- .card strong {
129
- color: #fff;
130
- font-weight: 600;
131
- }
132
-
133
- .launch-btn {
134
- background-color: var(--accent-color);
135
- color: white;
136
- border: none;
137
- padding: 14px 28px;
138
- border-radius: 30px;
139
- font-weight: 600;
140
- font-size: 1.1rem;
141
- cursor: pointer;
142
- transition: all 0.2s ease;
143
- width: 100%;
144
- text-align: center;
145
- }
146
-
147
- .launch-btn:hover {
148
- background-color: var(--accent-hover);
149
- transform: scale(1.02);
150
- }
151
-
152
- /* Modal Overlay */
153
- .modal-overlay {
154
- position: fixed;
155
- top: 0;
156
- left: 0;
157
- width: 100%;
158
- height: 100%;
159
- background: rgba(0, 0, 0, 0.75);
160
- backdrop-filter: blur(8px);
161
- z-index: 1000;
162
- display: none; /* Changed from visibility hidden to display none for stricter reset */
163
- align-items: center;
164
- justify-content: center;
165
- opacity: 0;
166
- transition: opacity 0.3s ease;
167
- }
168
-
169
- .modal-overlay.active {
170
- display: flex;
171
- opacity: 1;
172
- }
173
-
174
- /* macOS Window Styling */
175
- .mac-window {
176
- width: 85%;
177
- max-width: 1000px;
178
- height: 85vh;
179
- background: var(--mac-window-bg);
180
- border-radius: 12px;
181
- box-shadow: 0 50px 100px rgba(0, 0, 0, 0.6);
182
- display: flex;
183
- flex-direction: column;
184
- overflow: hidden;
185
- border: 1px solid rgba(255,255,255,0.1);
186
- transform: scale(0.95);
187
- transition: transform 0.3s cubic-bezier(0.19, 1, 0.22, 1);
188
- position: relative;
189
- }
190
-
191
- .modal-overlay.active .mac-window {
192
- transform: scale(1);
193
- }
194
-
195
- /* Window Header */
196
- .window-header {
197
- height: 44px;
198
- background: var(--mac-header-bg);
199
- border-bottom: 1px solid #1c1c1e;
200
- display: flex;
201
- align-items: center;
202
- padding-left: 16px;
203
- cursor: default;
204
- }
205
-
206
- /* The Red Button */
207
- .traffic-light {
208
- width: 14px;
209
- height: 14px;
210
- border-radius: 50%;
211
- background-color: #ff453a;
212
- border: none;
213
- cursor: pointer;
214
- position: relative;
215
- display: flex;
216
- align-items: center;
217
- justify-content: center;
218
- box-shadow: inset 0 1px 2px rgba(0,0,0,0.2);
219
- }
220
-
221
- .traffic-light:hover::after {
222
- content: "Γ—";
223
- color: #3b0000;
224
- font-size: 11px;
225
- font-weight: 900;
226
- margin-top: -1px;
227
- }
228
-
229
- .window-title {
230
- position: absolute;
231
- left: 50%;
232
- transform: translateX(-50%);
233
- font-size: 14px;
234
- color: #cfcfcf;
235
- font-weight: 500;
236
- }
237
-
238
- /* Window Content */
239
- .window-content {
240
- flex: 1;
241
- background: #000;
242
- position: relative;
243
- }
244
-
245
- iframe {
246
- width: 100%;
247
- height: 100%;
248
- border: none;
249
- background: #121212;
250
- }
251
-
252
- </style>
253
- </head>
254
- <body>
255
-
256
- <header>
257
- <h1>AI Model Laboratory</h1>
258
- <p class="subtitle">Welcome to the hands-on section! Based on the slideshow we just watched, choose an experiment below to test how computers "see" the world.</p>
259
- </header>
260
-
261
- <div class="playground-grid">
262
- <!-- Option 1: Pose Estimation -->
263
- <div class="card">
264
- <div class="icon-box">🧘</div>
265
- <h2>Pose Estimation</h2>
266
- <p>
267
- <strong>Remember the slide about skeletons?</strong><br><br>
268
- In this experiment, the AI will try to find your joints (like elbows, knees, and shoulders) and connect them with lines.
269
- <br><br>
270
- <em>Try this: Try to do some movements with yout hands and face. Does the AI follow your movement?</em>
271
- </p>
272
- <button class="launch-btn" onclick="openWindow('Pose Estimation', 'pose.html')">Launch Experiment</button>
273
- </div>
274
-
275
- <!-- Option 2: Object Recognition -->
276
- <div class="card">
277
- <div class="icon-box">πŸ”</div>
278
- <h2>Object Recognition</h2>
279
- <p>
280
- <strong>How does a self-driving car see?</strong><br><br>
281
- This model is trained to recognize thousands of everyday items. It draws a box around what it sees and gives it a label.
282
- <br><br>
283
- <em>Try this: Hold up a pen, a water bottle, or your shoe. Can it guess them all correctly?</em>
284
- </p>
285
- <center>
286
- <button id="dev-trigger-btn">Wondering what objects this model can detect? Click here to find out!</button>
287
- </center>
288
- <br>
289
- <button class="launch-btn" onclick="openWindow('Object Recognition', 'Object-Detection.html')">Launch Experiment</button>
290
- </div>
291
-
292
- <!-- Option 3: Face Expression -->
293
- <div class="card">
294
- <div class="icon-box">😊</div>
295
- <h2>Face Expression</h2>
296
- <p>
297
- <strong>Can computers understand feelings?</strong><br><br>
298
- This AI looks at the geometry of your faceβ€”how much your mouth curves or your eyebrows liftβ€”to guess your emotion.
299
- <br><br>
300
- <em>Try this: Make a super happy face, then a sad face. See if the "Confidence Score" changes!</em>
301
- </p>
302
- <button class="launch-btn" onclick="openWindow('Face Expression', 'Face-Expresion.html')">Launch Experiment</button>
303
- </div>
304
- </div>
305
-
306
- <h1 style="text-align:center; margin:60px 0 30px;">
307
- Here are some extra ones that you might like....
308
- </h1>
309
-
310
- <div class="playground-grid">
311
- <!-- Extra Option 1 -->
312
- <div class="card">
313
- <div class="icon-box">πŸƒ</div>
314
- <h2>JS WebCam Motion Detection</h2>
315
- <p>
316
- <strong>Can a computer actually β€œsee” movement?</strong><br><br>
317
- This project watches your webcam and compares each frame to the one before it.
318
- When something movesβ€”even a tiny bitβ€”the computer highlights the change so you can
319
- spot motion glowing on the screen.<br><br>
320
- <em>Try this: Wave your hand slowly, then quickly. Notice how the motion pattern changes!</em>
321
- </p>
322
- <button class="launch-btn" onclick="openWindow('Movement Detection', 'movement-detection.html')">Launch Experiment</button>
323
- </div>
324
-
325
- <!-- Extra Option 2 -->
326
- <div class="card">
327
- <div class="icon-box">πŸ‘οΈ</div>
328
- <h2>Object Detection with TensorFlow.js</h2>
329
- <p>
330
- <strong>How can a computer tell what's in a picture?</strong><br><br>
331
- This project uses a pre‑trained AI model that can look at an imageβ€”or even your
332
- webcamβ€”and point out objects it recognizes. It doesn’t just guess the object,
333
- it also shows *where* it is in the picture by drawing a box around it.<br><br>
334
- <em>Try this: Hold up different objects (like a pencil, cup, or book) and see
335
- which ones the AI can detect!</em>
336
- </p>
337
- <button class="launch-btn" onclick="openWindow('Object Detection with TensorFlow.js', 'live-feed-object-detection.html')">Launch Experiment</button>
338
- </div>
339
- </div>
340
-
341
- <!-- Modal Overlay -->
342
- <div class="modal-overlay" id="modalOverlay">
343
- <div class="mac-window" id="macWindow">
344
- <div class="window-header">
345
- <div class="traffic-light" id="closeBtn"></div>
346
- <div class="window-title" id="windowTitle">Terminal</div>
347
- </div>
348
- <div class="window-content">
349
- <iframe id="labFrame" src=""></iframe>
350
- </div>
351
- </div>
352
- </div>
353
-
354
-
355
- <script>
356
- // Wait for DOM to load to prevent "not defined" errors
357
- document.addEventListener('DOMContentLoaded', function() {
358
-
359
- const overlay = document.getElementById('modalOverlay');
360
- const macWindow = document.getElementById('macWindow');
361
- const labFrame = document.getElementById('labFrame');
362
- const windowTitle = document.getElementById('windowTitle');
363
- const closeBtn = document.getElementById('closeBtn');
364
-
365
- // Global function to be called by buttons
366
- window.openWindow = function(title, fileName) {
367
- if (windowTitle) windowTitle.textContent = "Running: " + title;
368
- if (overlay) overlay.classList.add('active');
369
-
370
- // Set the iframe SRC to the actual file link
371
- if (labFrame) labFrame.src = fileName;
372
- };
373
-
374
- function closeWindow() {
375
- if (overlay) overlay.classList.remove('active');
376
- // Clear iframe src to stop the page from running in background
377
- setTimeout(() => {
378
- if (labFrame) labFrame.src = "";
379
- }, 300);
380
- }
381
-
382
- // Close button listener
383
- if (closeBtn) {
384
- closeBtn.addEventListener('click', closeWindow);
385
- }
386
-
387
- // Click outside to close Logic
388
- if (overlay) {
389
- overlay.addEventListener('click', function(event) {
390
- if (event.target === overlay) {
391
- closeWindow();
392
- }
393
- });
394
- }
395
-
396
- // Prevent clicks inside the window from closing it
397
- if (macWindow) {
398
- macWindow.addEventListener('click', function(event) {
399
- event.stopPropagation();
400
- });
401
- }
402
- });
403
- </script>
404
-
405
- </body>
406
- </html>
407
-
408
-
409
-
410
-
411
-
412
-
413
-
414
-
415
-
416
-
417
-
418
-
419
-
420
-
421
-
422
-
423
-
424
-
425
-
426
-
427
-
428
-
429
-
430
-
431
-
432
-
433
-
434
-
435
-
436
-
437
-
438
-
439
-
440
-
441
-
442
-
443
-
444
-
445
-
446
-
447
-
448
-
449
-
450
-
451
-
452
-
453
-
454
-
455
-
456
-
457
-
458
-
459
-
460
-
461
-
462
-
463
-
464
-
465
-
466
-
467
-
468
-
469
-
470
-
471
-
472
-
473
-
474
-
475
-
476
-
477
-
478
-
479
-
480
-
481
-
482
-
483
-
484
-
485
-
486
-
487
-
488
-
489
-
490
-
491
-
492
-
493
-
494
-
495
-
496
-
497
-
498
-
499
-
500
-
501
-
502
-
503
-
504
-
505
-
506
-
507
-
508
-
509
-
510
-
511
-
512
-
513
-
514
-
515
-
516
-
517
-
518
-
519
-
520
-
521
-
522
-
523
-
524
-
525
-
526
-
527
-
528
-
529
-
530
-
531
-
532
-
533
-
534
-
535
-
536
-
537
-
538
-
539
-
540
-
541
-
542
-
543
-
544
-
545
-
546
-
547
-
548
-
549
-
550
-
551
-
552
-
553
-
554
-
555
-
556
-
557
-
558
-
559
-
560
-
561
-
562
-
563
-
564
-
565
-
566
-
567
-
568
-
569
-
570
-
571
-
572
-
573
-
574
-
575
-
576
-
577
-
578
-
579
-
580
-
581
-
582
-
583
-
584
-
585
-
586
-
587
-
588
-
589
-
590
-
591
-
592
-
593
-
594
-
595
-
596
-
597
-
598
-
599
-
600
-
601
-
602
-
603
-
604
-
605
-
606
-
607
-
608
-
609
-
610
-
611
-
612
-
613
-
614
-
615
-
616
-
617
-
618
-
619
-
620
-
621
-
622
-
623
-
624
-
625
-
626
-
627
-
628
-
629
-
630
-
631
-
632
-
633
-
634
-
635
-
636
-
637
-
638
-
639
-
640
-
641
-
642
-
643
-
644
-
645
-
646
-
647
-
648
-
649
-
650
-
651
-
652
-
653
-
654
-
655
-
656
-
657
-
658
-
659
-
660
-
661
-
662
-
663
-
664
-
665
-
666
-
667
-
668
-
669
-
670
-
671
-
672
-
673
-
674
-
675
-
676
-
677
-
678
-
679
-
680
-
681
-
682
-
683
-
684
-
685
-
686
-
687
-
688
-
689
-
690
-
691
-
692
-
693
-
694
-
695
-
696
-
697
-
698
-
699
-
700
-
701
-
702
-
703
-
704
-
705
-
706
-
707
-
708
-
709
-
710
-
711
-
712
-
713
-
714
-
715
-
716
-
717
-
718
-
719
-
720
-
721
-
722
-
723
-
724
-
725
-
726
-
727
-
728
-
729
-
730
-
731
-
732
-
733
-
734
-
735
-
736
-
737
-
738
-
739
-
740
-
741
-
742
-
743
-
744
-
745
-
746
-
747
-
748
-
749
-
750
-
751
-
752
-
753
-
754
-
755
-
756
-
757
-
758
-
759
-
760
-
761
-
762
-
763
-
764
-
765
-
766
-
767
-
768
-
769
-
770
-
771
-
772
-
773
-
774
-
775
-
776
-
777
-
778
-
779
-
780
-
781
-
782
-
783
-
784
-
785
-
786
-
787
-
788
-
789
-
790
-
791
-
792
-
793
-
794
-
795
-
796
-
797
-
798
-
799
-
800
-
801
-
802
-
803
-
804
-
805
-
806
-
807
-
808
-
809
-
810
-
811
-
812
-
813
-
814
-
815
-
816
-
817
-
818
-
819
-
820
-
821
-
822
-
823
-
824
-
825
-
826
-
827
-
828
-
829
-
830
-
831
-
832
-
833
-
834
-
835
-
836
-
837
-
838
-
839
-
840
-
841
-
842
-
843
-
844
-
845
-
846
-
847
-
848
-
849
-
850
-
851
-
852
-
853
-
854
-
855
-
856
-
857
-
858
-
859
-
860
-
861
-
862
-
863
-
864
-
865
-
866
-
867
-
868
-
869
-
870
-
871
-
872
-
873
-
874
-
875
-
876
-
877
-
878
-
879
-
880
-
881
-
882
-
883
-
884
-
885
-
886
-
887
-
888
-
889
-
890
-
891
-
892
-
893
-
894
-
895
-
896
-
897
-
898
-
899
-
900
-
901
-
902
-
903
-
904
- <!DOCTYPE html>
905
- <html lang="en">
906
- <head>
907
- <meta charset="UTF-8">
908
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
909
- <style>
910
-
911
-
912
- /* The Trigger Button */
913
- #dev-trigger-btn {
914
- background-color: #007AFF;
915
- color: white;
916
- border: none;
917
- padding: 12px 24px;
918
- font-size: 16px;
919
- font-weight: 600;
920
- border-radius: 8px;
921
- cursor: pointer;
922
- box-shadow: 0 4px 6px rgba(0,0,0,0.1);
923
- transition: transform 0.1s ease;
924
- }
925
-
926
- #dev-trigger-btn:active {
927
- transform: scale(0.96);
928
- }
929
-
930
- /* Modal Overlay (Background) */
931
- #modal-overlay {
932
- display: none; /* Hidden by default */
933
- position: fixed;
934
- top: 0;
935
- left: 0;
936
- width: 100%;
937
- height: 100%;
938
- background: rgba(0, 0, 0, 0.4);
939
- backdrop-filter: blur(5px);
940
- z-index: 1000;
941
- justify-content: center;
942
- align-items: center;
943
- opacity: 0;
944
- transition: opacity 0.3s ease;
945
- }
946
-
947
- /* The Dark MacOS Window */
948
- #macos-window {
949
- width: 80%;
950
- max-width: 900px;
951
- height: 70%;
952
- background-color: #1e1e1e; /* Dark Mode Background */
953
- border-radius: 12px;
954
- box-shadow: 0 20px 50px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.1);
955
- display: flex;
956
- flex-direction: column;
957
- overflow: hidden;
958
- transform: scale(0.95);
959
- transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
960
- }
961
-
962
- /* Window Title Bar */
963
- .window-header {
964
- height: 38px;
965
- background: linear-gradient(to bottom, #3a3a3a, #2b2b2b);
966
- border-bottom: 1px solid #000;
967
- display: flex;
968
- align-items: center;
969
- padding: 0 16px;
970
- flex-shrink: 0;
971
- }
972
-
973
- /* Traffic Light Buttons */
974
- .window-controls {
975
- display: flex;
976
- gap: 8px;
977
- }
978
-
979
- .control-dot {
980
- width: 12px;
981
- height: 12px;
982
- border-radius: 50%;
983
- border: 1px solid rgba(0,0,0,0.2);
984
- }
985
-
986
- .close-dot { background-color: #ff5f56; cursor: pointer; }
987
- .close-dot:hover { background-color: #ff3b30; } /* Brightens on hover */
988
- .minimize-dot { background-color: #ffbd2e; }
989
- .expand-dot { background-color: #27c93f; }
990
-
991
- .window-title {
992
- color: #d1d1d1;
993
- font-size: 13px;
994
- font-weight: 500;
995
- margin-left: 20px;
996
- flex-grow: 1;
997
- text-align: center;
998
- padding-right: 60px; /* Balance the title */
999
- }
1000
-
1001
- /* Content Area */
1002
- .window-content {
1003
- padding: 20px;
1004
- overflow-y: auto;
1005
- color: #fff;
1006
- }
1007
-
1008
- /* Grid for Tiles */
1009
- .tiles-grid {
1010
- display: grid;
1011
- grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
1012
- gap: 16px;
1013
- }
1014
-
1015
- /* Individual Tile Style */
1016
- .tile {
1017
- background-color: #2c2c2e;
1018
- border: 1px solid #3a3a3c;
1019
- border-radius: 8px;
1020
- padding: 16px;
1021
- display: flex;
1022
- flex-direction: column;
1023
- gap: 8px;
1024
- transition: background-color 0.2s;
1025
- }
1026
-
1027
- .tile:hover {
1028
- background-color: #3a3a3c;
1029
- }
1030
-
1031
- .tile-icon {
1032
- font-size: 32px;
1033
- }
1034
-
1035
- .tile-name {
1036
- font-size: 16px;
1037
- font-weight: 700;
1038
- color: #fff;
1039
- text-transform: capitalize;
1040
- }
1041
-
1042
- .tile-desc {
1043
- font-size: 13px;
1044
- line-height: 1.4;
1045
- color: #a1a1a6;
1046
- }
1047
-
1048
- /* Scrollbar Styling */
1049
- .window-content::-webkit-scrollbar {
1050
- width: 8px;
1051
- }
1052
- .window-content::-webkit-scrollbar-track {
1053
- background: #1e1e1e;
1054
- }
1055
- .window-content::-webkit-scrollbar-thumb {
1056
- background: #48484a;
1057
- border-radius: 4px;
1058
- }
1059
-
1060
- /* Animation States */
1061
- #modal-overlay.active {
1062
- display: flex;
1063
- opacity: 1;
1064
- }
1065
-
1066
- #modal-overlay.active #macos-window {
1067
- transform: scale(1);
1068
- }
1069
- </style>
1070
- </head>
1071
- <body>
1072
-
1073
- <!-- 1. The Trigger Button -->
1074
-
1075
- <!-- 2. The Modal Structure -->
1076
- <div id="modal-overlay">
1077
- <div id="macos-window">
1078
- <!-- Header with Red Button -->
1079
- <div class="window-header">
1080
- <div class="window-controls">
1081
- <div class="control-dot close-dot" id="close-btn" title="Close"></div>
1082
- </div>
1083
-
1084
- <div class="window-title">COCO Dataset Classes (80 Objects)</div>
1085
- </div>
1086
-
1087
- <!-- Content -->
1088
- <div class="window-content">
1089
- <div style="margin-bottom: 20px; color: #a1a1a6; font-size: 14px;">
1090
- This AI model is trained to see the world like you do. Below are the 80 different things it can instantly recognize in a photo.
1091
- </div>
1092
- <div class="tiles-grid" id="tiles-container">
1093
- <!-- Tiles injected via JS -->
1094
- </div>
1095
- </div>
1096
- </div>
1097
- </div>
1098
-
1099
- <script>
1100
- // Data: 80 COCO Classes with Emojis and Kid-Friendly Explanations
1101
- const cocoData = [
1102
- { name: "person", emoji: "πŸ‘€", desc: "A human being, like you, your friends, or your teacher." },
1103
- { name: "bicycle", emoji: "🚲", desc: "A two-wheeled vehicle that you pedal to ride." },
1104
- { name: "car", emoji: "πŸš—", desc: "A vehicle with four wheels used to drive on roads." },
1105
- { name: "motorcycle", emoji: "🏍️", desc: "Like a bicycle, but with a fast engine and heavier wheels." },
1106
- { name: "airplane", emoji: "✈️", desc: "A flying machine with wings that carries passengers across the sky." },
1107
- { name: "bus", emoji: "🚌", desc: "A large vehicle that carries many people along a set route." },
1108
- { name: "train", emoji: "πŸš†", desc: "A series of connected cars that run on a metal track." },
1109
- { name: "truck", emoji: "🚚", desc: "A large, heavy vehicle used for carrying cargo or big loads." },
1110
- { name: "boat", emoji: "β›΅", desc: "A vehicle designed to float and travel on water." },
1111
- { name: "traffic light", emoji: "🚦", desc: "A signal with red, yellow, and green lights to control cars." },
1112
- { name: "fire hydrant", emoji: "πŸš’", desc: "A pipe on the street that firefighters use to get water." },
1113
- { name: "stop sign", emoji: "πŸ›‘", desc: "A red octagon sign that tells drivers to stop moving." },
1114
- { name: "parking meter", emoji: "πŸ…ΏοΈ", desc: "A machine where you pay money to park your car on the street." },
1115
- { name: "bench", emoji: "πŸͺ‘", desc: "A long seat for several people, usually found in parks." },
1116
- { name: "bird", emoji: "🐦", desc: "An animal with feathers and wings that can usually fly." },
1117
- { name: "cat", emoji: "🐈", desc: "A small, furry pet that purrs and catches mice." },
1118
- { name: "dog", emoji: "πŸ•", desc: "A loyal pet with four legs that barks and loves to play." },
1119
- { name: "horse", emoji: "🐎", desc: "A large, strong animal that people can ride." },
1120
- { name: "sheep", emoji: "πŸ‘", desc: "A fluffy farm animal that gives us wool for clothes." },
1121
- { name: "cow", emoji: "πŸ„", desc: "A large farm animal that gives us milk." },
1122
- { name: "elephant", emoji: "🐘", desc: "A huge animal with big ears and a long trunk." },
1123
- { name: "bear", emoji: "🐻", desc: "A large, strong wild animal with thick fur." },
1124
- { name: "zebra", emoji: "πŸ¦“", desc: "A wild horse-like animal with black and white stripes." },
1125
- { name: "giraffe", emoji: "πŸ¦’", desc: "The tallest animal, with a very long neck to eat tree leaves." },
1126
- { name: "backpack", emoji: "πŸŽ’", desc: "A bag you carry on your back to hold books and supplies." },
1127
- { name: "umbrella", emoji: "β˜‚οΈ", desc: "A tool you hold over your head to stay dry in the rain." },
1128
- { name: "handbag", emoji: "πŸ‘œ", desc: "A small bag used to carry personal items like a wallet." },
1129
- { name: "tie", emoji: "πŸ‘”", desc: "A long piece of cloth worn around the neck with a suit." },
1130
- { name: "suitcase", emoji: "🧳", desc: "A large bag used for packing clothes when traveling." },
1131
- { name: "frisbee", emoji: "πŸ₯", desc: "A plastic disc you throw to a friend or dog." },
1132
- { name: "skis", emoji: "⛷️", desc: "Long, flat runners you attach to boots to glide on snow." },
1133
- { name: "snowboard", emoji: "πŸ‚", desc: "A single wide board you stand on to surf down snowy hills." },
1134
- { name: "sports ball", emoji: "⚽", desc: "Any round object used in games like soccer, basketball, or tennis." },
1135
- { name: "kite", emoji: "πŸͺ", desc: "A light frame with paper or cloth that flies in the wind." },
1136
- { name: "baseball bat", emoji: "⚾", desc: "A smooth wooden or metal stick used to hit a baseball." },
1137
- { name: "baseball glove", emoji: "🧀", desc: "A leather mitt worn to catch a baseball safely." },
1138
- { name: "skateboard", emoji: "πŸ›Ή", desc: "A short board with wheels that you stand on and ride." },
1139
- { name: "surfboard", emoji: "πŸ„", desc: "A long board used to ride ocean waves." },
1140
- { name: "tennis racket", emoji: "🎾", desc: "A bat with a net mesh used to hit a tennis ball." },
1141
- { name: "bottle", emoji: "🍾", desc: "A container with a narrow neck for holding liquids." },
1142
- { name: "wine glass", emoji: "🍷", desc: "A fancy glass with a stem, used for special drinks." },
1143
- { name: "cup", emoji: "β˜•", desc: "A small open container for drinking tea or coffee." },
1144
- { name: "fork", emoji: "🍴", desc: "A tool with prongs used to pick up food." },
1145
- { name: "knife", emoji: "πŸ”ͺ", desc: "A tool with a sharp edge used for cutting food." },
1146
- { name: "spoon", emoji: "πŸ₯„", desc: "A tool with a small scoop for eating soup or cereal." },
1147
- { name: "bowl", emoji: "πŸ₯£", desc: "A round, deep dish used for soup or cereal." },
1148
- { name: "banana", emoji: "🍌", desc: "A long, curved yellow fruit that you peel to eat." },
1149
- { name: "apple", emoji: "🍎", desc: "A round red or green fruit that is crunchy and sweet." },
1150
- { name: "sandwich", emoji: "πŸ₯ͺ", desc: "Two slices of bread with meat, cheese, or veggies inside." },
1151
- { name: "orange", emoji: "🍊", desc: "A round citrus fruit with a thick skin and juicy inside." },
1152
- { name: "broccoli", emoji: "πŸ₯¦", desc: "A green vegetable that looks like a little tree." },
1153
- { name: "carrot", emoji: "πŸ₯•", desc: "A crunchy orange vegetable that grows underground." },
1154
- { name: "hot dog", emoji: "🌭", desc: "A cooked sausage served in a long, soft bun." },
1155
- { name: "pizza", emoji: "πŸ•", desc: "A round dough base topped with tomato sauce and cheese." },
1156
- { name: "donut", emoji: "🍩", desc: "A sweet, fried ring of dough, often with frosting." },
1157
- { name: "cake", emoji: "πŸŽ‚", desc: "A sweet baked dessert often eaten at birthday parties." },
1158
- { name: "chair", emoji: "πŸͺ‘", desc: "A piece of furniture designed for one person to sit on." },
1159
- { name: "couch", emoji: "πŸ›‹οΈ", desc: "A soft, long seat where multiple people can relax." },
1160
- { name: "potted plant", emoji: "πŸͺ΄", desc: "A plant grown inside a container for decoration." },
1161
- { name: "bed", emoji: "πŸ›οΈ", desc: "A piece of furniture with a mattress for sleeping." },
1162
- { name: "dining table", emoji: "🍽️", desc: "A large table where families sit to eat meals." },
1163
- { name: "toilet", emoji: "🚽", desc: "A bathroom fixture used for getting rid of waste." },
1164
- { name: "tv", emoji: "πŸ“Ί", desc: "An electronic screen for watching shows and movies." },
1165
- { name: "laptop", emoji: "πŸ’»", desc: "A portable computer that you can use on your lap." },
1166
- { name: "mouse", emoji: "πŸ–±οΈ", desc: "A handheld device used to move the cursor on a computer." },
1167
- { name: "remote", emoji: "πŸ“‘", desc: "A controller used to change channels on a TV from afar." },
1168
- { name: "keyboard", emoji: "⌨️", desc: "A board with buttons for typing letters into a computer." },
1169
- { name: "cell phone", emoji: "πŸ“±", desc: "A small phone you can carry in your pocket." },
1170
- { name: "microwave", emoji: "​​​​​​⏲️", desc: "An oven that heats food very quickly." },
1171
- { name: "oven", emoji: "πŸ₯˜", desc: "A kitchen appliance used for baking and roasting food." },
1172
- { name: "toaster", emoji: "🍞", desc: "A machine that browns bread slices." },
1173
- { name: "sink", emoji: "🚰", desc: "A basin with a faucet for washing hands or dishes." },
1174
- { name: "refrigerator", emoji: "❄️", desc: "A cold closet that keeps food fresh." },
1175
- { name: "book", emoji: "πŸ“–", desc: "A set of pages with writing or pictures to read." },
1176
- { name: "clock", emoji: "⏰", desc: "A device that tells you what time it is." },
1177
- { name: "vase", emoji: "🏺", desc: "A decorative container used for holding flowers." },
1178
- { name: "scissors", emoji: "βœ‚οΈ", desc: "A tool with two blades used for cutting paper." },
1179
- { name: "teddy bear", emoji: "🧸", desc: "A soft toy bear that is cuddly and cute." },
1180
- { name: "hair drier", emoji: "πŸ’¨", desc: "A machine that blows hot air to dry wet hair." },
1181
- { name: "toothbrush", emoji: "πŸͺ₯", desc: "A small brush used to clean your teeth." }
1182
- ];
1183
-
1184
- // DOM Elements
1185
- const triggerBtn = document.getElementById('dev-trigger-btn');
1186
- const modal = document.getElementById('modal-overlay');
1187
- const closeBtn = document.getElementById('close-btn');
1188
- const tilesContainer = document.getElementById('tiles-container');
1189
- const macosWindow = document.getElementById('macos-window');
1190
-
1191
- // 1. Populate the Grid
1192
- function renderTiles() {
1193
- tilesContainer.innerHTML = cocoData.map(item => `
1194
- <div class="tile">
1195
- <div class="tile-icon">${item.emoji}</div>
1196
- <div class="tile-name">${item.name}</div>
1197
- <div class="tile-desc">${item.desc}</div>
1198
- </div>
1199
- `).join('');
1200
- }
1201
-
1202
- // 2. Open Modal Function
1203
- triggerBtn.addEventListener('click', () => {
1204
- renderTiles(); // Render content on open
1205
- modal.classList.add('active'); // Show modal
1206
- });
1207
-
1208
- // 3. Close Modal Function
1209
- function closeModal() {
1210
- modal.classList.remove('active');
1211
- }
1212
-
1213
- // Event: Click the Red Dot
1214
- closeBtn.addEventListener('click', closeModal);
1215
-
1216
- // Event: Click Outside the Window
1217
- modal.addEventListener('click', (e) => {
1218
- // If the user clicks the dark background (modal), close it.
1219
- // If they click INSIDE the window, do nothing.
1220
- if (e.target === modal) {
1221
- closeModal();
1222
- }
1223
- });
1224
-
1225
- </script>
1226
- </body>
1227
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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.0">
6
+ <title>AI STEM Lab</title>
7
+ <style>
8
+ :root {
9
+ /* Dark Mode Variables */
10
+ --bg-color: #121212;
11
+ --card-bg: #1e1e1e;
12
+ --accent-color: #0a84ff; /* Apple-style vibrant blue */
13
+ --accent-hover: #409cff;
14
+ --text-main: #f5f5f7;
15
+ --text-secondary: #a1a1a6;
16
+
17
+ /* Window Colors */
18
+ --mac-window-bg: #2c2c2e;
19
+ --mac-header-bg: #3a3a3c;
20
+ --mac-border: rgba(0, 0, 0, 0.5);
21
+ }
22
+
23
+ body {
24
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
25
+ background-color: var(--bg-color);
26
+ color: var(--text-main);
27
+ margin: 0;
28
+ display: flex;
29
+ flex-direction: column;
30
+ align-items: center;
31
+ justify-content: center;
32
+ min-height: 100vh;
33
+ padding: 20px;
34
+ }
35
+
36
+ /* Playground Header */
37
+ header {
38
+ margin-bottom: 50px;
39
+ text-align: center;
40
+ max-width: 800px;
41
+ }
42
+
43
+ h1 {
44
+ color: var(--text-main);
45
+ font-weight: 800;
46
+ font-size: 3rem;
47
+ margin: 0 0 15px 0;
48
+ letter-spacing: -0.03em;
49
+ background: linear-gradient(90deg, #fff, #a1a1a6);
50
+ -webkit-background-clip: text;
51
+ -webkit-text-fill-color: transparent;
52
+ }
53
+
54
+ p.subtitle {
55
+ color: var(--text-secondary);
56
+ font-size: 1.3rem;
57
+ line-height: 1.5;
58
+ }
59
+
60
+ /* Card Container */
61
+ .playground-grid {
62
+ display: grid;
63
+ grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
64
+ gap: 30px;
65
+ width: 95%;
66
+ max-width: 1400px;
67
+ }
68
+
69
+ /* Lab Cards */
70
+ .card {
71
+ background: var(--card-bg);
72
+ border-radius: 24px;
73
+ padding: 40px;
74
+ box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
75
+ transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease;
76
+ display: flex;
77
+ flex-direction: column;
78
+ align-items: flex-start;
79
+ border: 1px solid rgba(255,255,255,0.08);
80
+ position: relative;
81
+ overflow: hidden;
82
+ }
83
+
84
+ .card:hover {
85
+ transform: translateY(-8px);
86
+ box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
87
+ border-color: rgba(255,255,255,0.2);
88
+ }
89
+
90
+ .card::before {
91
+ content: '';
92
+ position: absolute;
93
+ top: 0;
94
+ left: 0;
95
+ width: 100%;
96
+ height: 6px;
97
+ background: linear-gradient(90deg, var(--accent-color), #bc52ff);
98
+ opacity: 0.7;
99
+ }
100
+
101
+ .icon-box {
102
+ width: 64px;
103
+ height: 64px;
104
+ background: rgba(255, 255, 255, 0.1);
105
+ border-radius: 16px;
106
+ display: flex;
107
+ align-items: center;
108
+ justify-content: center;
109
+ font-size: 32px;
110
+ margin-bottom: 25px;
111
+ }
112
+
113
+ .card h2 {
114
+ margin: 0 0 15px 0;
115
+ font-size: 1.8rem;
116
+ font-weight: 700;
117
+ color: var(--text-main);
118
+ }
119
+
120
+ .card p {
121
+ margin: 0 0 30px 0;
122
+ color: var(--text-secondary);
123
+ line-height: 1.6;
124
+ font-size: 1.1rem;
125
+ flex-grow: 1;
126
+ }
127
+
128
+ .card strong {
129
+ color: #fff;
130
+ font-weight: 600;
131
+ }
132
+
133
+ .launch-btn {
134
+ background-color: var(--accent-color);
135
+ color: white;
136
+ border: none;
137
+ padding: 14px 28px;
138
+ border-radius: 30px;
139
+ font-weight: 600;
140
+ font-size: 1.1rem;
141
+ cursor: pointer;
142
+ transition: all 0.2s ease;
143
+ width: 100%;
144
+ text-align: center;
145
+ }
146
+
147
+ .launch-btn:hover {
148
+ background-color: var(--accent-hover);
149
+ transform: scale(1.02);
150
+ }
151
+
152
+ /* Modal Overlay */
153
+ .modal-overlay {
154
+ position: fixed;
155
+ top: 0;
156
+ left: 0;
157
+ width: 100%;
158
+ height: 100%;
159
+ background: rgba(0, 0, 0, 0.75);
160
+ backdrop-filter: blur(8px);
161
+ z-index: 1000;
162
+ display: none; /* Changed from visibility hidden to display none for stricter reset */
163
+ align-items: center;
164
+ justify-content: center;
165
+ opacity: 0;
166
+ transition: opacity 0.3s ease;
167
+ }
168
+
169
+ .modal-overlay.active {
170
+ display: flex;
171
+ opacity: 1;
172
+ }
173
+
174
+ /* macOS Window Styling */
175
+ .mac-window {
176
+ width: 85%;
177
+ max-width: 1000px;
178
+ height: 85vh;
179
+ background: var(--mac-window-bg);
180
+ border-radius: 12px;
181
+ box-shadow: 0 50px 100px rgba(0, 0, 0, 0.6);
182
+ display: flex;
183
+ flex-direction: column;
184
+ overflow: hidden;
185
+ border: 1px solid rgba(255,255,255,0.1);
186
+ transform: scale(0.95);
187
+ transition: transform 0.3s cubic-bezier(0.19, 1, 0.22, 1);
188
+ position: relative;
189
+ }
190
+
191
+ .modal-overlay.active .mac-window {
192
+ transform: scale(1);
193
+ }
194
+
195
+ /* Window Header */
196
+ .window-header {
197
+ height: 44px;
198
+ background: var(--mac-header-bg);
199
+ border-bottom: 1px solid #1c1c1e;
200
+ display: flex;
201
+ align-items: center;
202
+ padding-left: 16px;
203
+ cursor: default;
204
+ }
205
+
206
+ /* The Red Button */
207
+ .traffic-light {
208
+ width: 14px;
209
+ height: 14px;
210
+ border-radius: 50%;
211
+ background-color: #ff453a;
212
+ border: none;
213
+ cursor: pointer;
214
+ position: relative;
215
+ display: flex;
216
+ align-items: center;
217
+ justify-content: center;
218
+ box-shadow: inset 0 1px 2px rgba(0,0,0,0.2);
219
+ }
220
+
221
+ .traffic-light:hover::after {
222
+ content: "Γ—";
223
+ color: #3b0000;
224
+ font-size: 11px;
225
+ font-weight: 900;
226
+ margin-top: -1px;
227
+ }
228
+
229
+ .window-title {
230
+ position: absolute;
231
+ left: 50%;
232
+ transform: translateX(-50%);
233
+ font-size: 14px;
234
+ color: #cfcfcf;
235
+ font-weight: 500;
236
+ }
237
+
238
+ /* Window Content */
239
+ .window-content {
240
+ flex: 1;
241
+ background: #000;
242
+ position: relative;
243
+ }
244
+
245
+ iframe {
246
+ width: 100%;
247
+ height: 100%;
248
+ border: none;
249
+ background: #121212;
250
+ }
251
+
252
+ </style>
253
+ </head>
254
+ <body>
255
+
256
+ <header>
257
+ <h1>AI Model Laboratory</h1>
258
+ <p class="subtitle">Welcome to the hands-on section! Based on the slideshow we just watched, choose an experiment below to test how computers "see" the world.</p>
259
+ </header>
260
+
261
+ <div class="playground-grid">
262
+ <!-- Option 1: Pose Estimation -->
263
+ <div class="card">
264
+ <div class="icon-box">🧘</div>
265
+ <h2>Pose Estimation</h2>
266
+ <p>
267
+ <strong>Remember the slide about skeletons?</strong><br><br>
268
+ In this experiment, the AI will try to find your joints (like elbows, knees, and shoulders) and connect them with lines.
269
+ <br><br>
270
+ <em>Try this: Try to do some movements with yout hands and face. Does the AI follow your movement?</em>
271
+ </p>
272
+ <button class="launch-btn" onclick="openWindow('Pose Estimation', 'pose.html')">Launch Experiment</button>
273
+ </div>
274
+
275
+ <!-- Option 2: Object Recognition -->
276
+ <div class="card">
277
+ <div class="icon-box">πŸ”</div>
278
+ <h2>Object Recognition</h2>
279
+ <p>
280
+ <strong>How does a self-driving car see?</strong><br><br>
281
+ This model is trained to recognize thousands of everyday items. It draws a box around what it sees and gives it a label.
282
+ <br><br>
283
+ <em>Try this: Hold up a pen, a water bottle, or your shoe. Can it guess them all correctly?</em>
284
+ </p>
285
+ <center>
286
+ <button id="dev-trigger-btn">Wondering what objects this model can detect? Click here to find out!</button>
287
+ </center>
288
+ <br>
289
+ <button class="launch-btn" onclick="openWindow('Object Recognition', 'Object-Detection.html')">Launch Experiment</button>
290
+ </div>
291
+
292
+ <!-- Option 3: Face Expression -->
293
+ <div class="card">
294
+ <div class="icon-box">😊</div>
295
+ <h2>Face Expression</h2>
296
+ <p>
297
+ <strong>Can computers understand feelings?</strong><br><br>
298
+ This AI looks at the geometry of your faceβ€”how much your mouth curves or your eyebrows liftβ€”to guess your emotion.
299
+ <br><br>
300
+ <em>Try this: Make a super happy face, then a sad face. See if the "Confidence Score" changes!</em>
301
+ </p>
302
+ <button class="launch-btn" onclick="openWindow('Face Expression', 'Face-Expresion.html')">Launch Experiment</button>
303
+ </div>
304
+ </div>
305
+
306
+ <h1 style="text-align:center; margin:60px 0 30px;">
307
+ Here are some extra ones that you might like....
308
+ </h1>
309
+
310
+ <div class="playground-grid">
311
+ <!-- Extra Option 1 -->
312
+ <div class="card">
313
+ <div class="icon-box">πŸƒ</div>
314
+ <h2>JS WebCam Motion Detection</h2>
315
+ <p>
316
+ <strong>Can a computer actually β€œsee” movement?</strong><br><br>
317
+ This project watches your webcam and compares each frame to the one before it.
318
+ When something movesβ€”even a tiny bitβ€”the computer highlights the change so you can
319
+ spot motion glowing on the screen.<br><br>
320
+ <em>Try this: Wave your hand slowly, then quickly. Notice how the motion pattern changes!</em>
321
+ </p>
322
+ <button class="launch-btn" onclick="openWindow('Movement Detection', 'movement-detection.html')">Launch Experiment</button>
323
+ </div>
324
+
325
+ <!-- Extra Option 2 -->
326
+ <div class="card">
327
+ <div class="icon-box">πŸ‘οΈ</div>
328
+ <h2>Object Detection with TensorFlow.js</h2>
329
+ <p>
330
+ <strong>How can a computer tell what's in a picture?</strong><br><br>
331
+ This project uses a pre‑trained AI model that can look at an imageβ€”or even your
332
+ webcamβ€”and point out objects it recognizes. It doesn’t just guess the object,
333
+ it also shows *where* it is in the picture by drawing a box around it.<br><br>
334
+ <em>Try this: Hold up different objects (like a pencil, cup, or book) and see
335
+ which ones the AI can detect!</em>
336
+ </p>
337
+ <button class="launch-btn" onclick="openWindow('Object Detection with TensorFlow.js', 'live-feed-object-detection.html')">Launch Experiment</button>
338
+ </div>
339
+ <!-- Extra Option 2 -->
340
+ <div class="card">
341
+ <div class="icon-box">πŸ‘οΈ</div>
342
+ <h2>Want to make your own model?</h2>
343
+ <p>
344
+ <strong>How about making your own AI model that detects the objects <em>you</em> care about?</strong><br><br>
345
+ You can try this experiment to build your own custom model using TensorFlow.js and the Teachable Machine Algorithm.<br><br>
346
+ <br>
347
+ <em>Tip:</em> Try choosing 2 objects around you (like a water bottle, pencil, pair of headphones, or even yourself) and gather at least 30 images of each from different angles. The more variety you include, the smarter your model becomes.<br><br>
348
+
349
+ </p>
350
+ </p>
351
+ <button class="launch-btn" onclick="openWindow('build your own custom model using TensorFlow.js and the Teachable Machine Algorithm', 'make-model.html')">Launch Experiment</button>
352
+ </div>
353
+ </div>
354
+
355
+
356
+
357
+
358
+ <!-- Modal Overlay -->
359
+ <div class="modal-overlay" id="modalOverlay">
360
+ <div class="mac-window" id="macWindow">
361
+ <div class="window-header">
362
+ <div class="traffic-light" id="closeBtn"></div>
363
+ <div class="window-title" id="windowTitle">Terminal</div>
364
+ </div>
365
+ <div class="window-content">
366
+ <iframe id="labFrame" src=""></iframe>
367
+ </div>
368
+ </div>
369
+
370
+
371
+
372
+
373
+ </div>
374
+
375
+
376
+ <script>
377
+ // Wait for DOM to load to prevent "not defined" errors
378
+ document.addEventListener('DOMContentLoaded', function() {
379
+
380
+ const overlay = document.getElementById('modalOverlay');
381
+ const macWindow = document.getElementById('macWindow');
382
+ const labFrame = document.getElementById('labFrame');
383
+ const windowTitle = document.getElementById('windowTitle');
384
+ const closeBtn = document.getElementById('closeBtn');
385
+
386
+ // Global function to be called by buttons
387
+ window.openWindow = function(title, fileName) {
388
+ if (windowTitle) windowTitle.textContent = "Running: " + title;
389
+ if (overlay) overlay.classList.add('active');
390
+
391
+ // Set the iframe SRC to the actual file link
392
+ if (labFrame) labFrame.src = fileName;
393
+ };
394
+
395
+ function closeWindow() {
396
+ if (overlay) overlay.classList.remove('active');
397
+ // Clear iframe src to stop the page from running in background
398
+ setTimeout(() => {
399
+ if (labFrame) labFrame.src = "";
400
+ }, 300);
401
+ }
402
+
403
+ // Close button listener
404
+ if (closeBtn) {
405
+ closeBtn.addEventListener('click', closeWindow);
406
+ }
407
+
408
+ // Click outside to close Logic
409
+ if (overlay) {
410
+ overlay.addEventListener('click', function(event) {
411
+ if (event.target === overlay) {
412
+ closeWindow();
413
+ }
414
+ });
415
+ }
416
+
417
+ // Prevent clicks inside the window from closing it
418
+ if (macWindow) {
419
+ macWindow.addEventListener('click', function(event) {
420
+ event.stopPropagation();
421
+ });
422
+ }
423
+ });
424
+ </script>
425
+
426
+ </body>
427
+ </html>
428
+
429
+
430
+
431
+
432
+
433
+
434
+
435
+
436
+
437
+
438
+
439
+
440
+
441
+
442
+
443
+
444
+
445
+
446
+
447
+
448
+
449
+
450
+
451
+
452
+
453
+
454
+
455
+
456
+
457
+
458
+
459
+
460
+
461
+
462
+
463
+
464
+
465
+
466
+
467
+
468
+
469
+
470
+
471
+
472
+
473
+
474
+
475
+
476
+
477
+
478
+
479
+
480
+
481
+
482
+
483
+
484
+
485
+
486
+
487
+
488
+
489
+
490
+
491
+
492
+
493
+
494
+
495
+
496
+
497
+
498
+
499
+
500
+
501
+
502
+
503
+
504
+
505
+
506
+
507
+
508
+
509
+
510
+
511
+
512
+
513
+
514
+
515
+
516
+
517
+
518
+
519
+
520
+
521
+
522
+
523
+
524
+
525
+
526
+
527
+
528
+
529
+
530
+
531
+
532
+
533
+
534
+
535
+
536
+
537
+
538
+
539
+
540
+
541
+
542
+
543
+
544
+
545
+
546
+
547
+
548
+
549
+
550
+
551
+
552
+
553
+
554
+
555
+
556
+
557
+
558
+
559
+
560
+
561
+
562
+
563
+
564
+
565
+
566
+
567
+
568
+
569
+
570
+
571
+
572
+
573
+
574
+
575
+
576
+
577
+
578
+
579
+
580
+
581
+
582
+
583
+
584
+
585
+
586
+
587
+
588
+
589
+
590
+
591
+
592
+
593
+
594
+
595
+
596
+
597
+
598
+
599
+
600
+
601
+
602
+
603
+
604
+
605
+
606
+
607
+
608
+
609
+
610
+
611
+
612
+
613
+
614
+
615
+
616
+
617
+
618
+
619
+
620
+
621
+
622
+
623
+
624
+
625
+
626
+
627
+
628
+
629
+
630
+
631
+
632
+
633
+
634
+
635
+
636
+
637
+
638
+
639
+
640
+
641
+
642
+
643
+
644
+
645
+
646
+
647
+
648
+
649
+
650
+
651
+
652
+
653
+
654
+
655
+
656
+
657
+
658
+
659
+
660
+
661
+
662
+
663
+
664
+
665
+
666
+
667
+
668
+
669
+
670
+
671
+
672
+
673
+
674
+
675
+
676
+
677
+
678
+
679
+
680
+
681
+
682
+
683
+
684
+
685
+
686
+
687
+
688
+
689
+
690
+
691
+
692
+
693
+
694
+
695
+
696
+
697
+
698
+
699
+
700
+
701
+
702
+
703
+
704
+
705
+
706
+
707
+
708
+
709
+
710
+
711
+
712
+
713
+
714
+
715
+
716
+
717
+
718
+
719
+
720
+
721
+
722
+
723
+
724
+
725
+
726
+
727
+
728
+
729
+
730
+
731
+
732
+
733
+
734
+
735
+
736
+
737
+
738
+
739
+
740
+
741
+
742
+
743
+
744
+
745
+
746
+
747
+
748
+
749
+
750
+
751
+
752
+
753
+
754
+
755
+
756
+
757
+
758
+
759
+
760
+
761
+
762
+
763
+
764
+
765
+
766
+
767
+
768
+
769
+
770
+
771
+
772
+
773
+
774
+
775
+
776
+
777
+
778
+
779
+
780
+
781
+
782
+
783
+
784
+
785
+
786
+
787
+
788
+
789
+
790
+
791
+
792
+
793
+
794
+
795
+
796
+
797
+
798
+
799
+
800
+
801
+
802
+
803
+
804
+
805
+
806
+
807
+
808
+
809
+
810
+
811
+
812
+
813
+
814
+
815
+
816
+
817
+
818
+
819
+
820
+
821
+
822
+
823
+
824
+
825
+
826
+
827
+
828
+
829
+
830
+
831
+
832
+
833
+
834
+
835
+
836
+
837
+
838
+
839
+
840
+
841
+
842
+
843
+
844
+
845
+
846
+
847
+
848
+
849
+
850
+
851
+
852
+
853
+
854
+
855
+
856
+
857
+
858
+
859
+
860
+
861
+
862
+
863
+
864
+
865
+
866
+
867
+
868
+
869
+
870
+
871
+
872
+
873
+
874
+
875
+
876
+
877
+
878
+
879
+
880
+
881
+
882
+
883
+
884
+
885
+
886
+
887
+
888
+
889
+
890
+
891
+
892
+
893
+
894
+
895
+
896
+
897
+
898
+
899
+
900
+
901
+
902
+
903
+
904
+
905
+
906
+
907
+
908
+
909
+
910
+
911
+
912
+
913
+
914
+
915
+
916
+
917
+
918
+
919
+
920
+
921
+
922
+
923
+
924
+
925
+ <!DOCTYPE html>
926
+ <html lang="en">
927
+ <head>
928
+ <meta charset="UTF-8">
929
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
930
+ <style>
931
+
932
+
933
+ /* The Trigger Button */
934
+ #dev-trigger-btn {
935
+ background-color: #007AFF;
936
+ color: white;
937
+ border: none;
938
+ padding: 12px 24px;
939
+ font-size: 16px;
940
+ font-weight: 600;
941
+ border-radius: 8px;
942
+ cursor: pointer;
943
+ box-shadow: 0 4px 6px rgba(0,0,0,0.1);
944
+ transition: transform 0.1s ease;
945
+ }
946
+
947
+ #dev-trigger-btn:active {
948
+ transform: scale(0.96);
949
+ }
950
+
951
+ /* Modal Overlay (Background) */
952
+ #modal-overlay {
953
+ display: none; /* Hidden by default */
954
+ position: fixed;
955
+ top: 0;
956
+ left: 0;
957
+ width: 100%;
958
+ height: 100%;
959
+ background: rgba(0, 0, 0, 0.4);
960
+ backdrop-filter: blur(5px);
961
+ z-index: 1000;
962
+ justify-content: center;
963
+ align-items: center;
964
+ opacity: 0;
965
+ transition: opacity 0.3s ease;
966
+ }
967
+
968
+ /* The Dark MacOS Window */
969
+ #macos-window {
970
+ width: 80%;
971
+ max-width: 900px;
972
+ height: 70%;
973
+ background-color: #1e1e1e; /* Dark Mode Background */
974
+ border-radius: 12px;
975
+ box-shadow: 0 20px 50px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.1);
976
+ display: flex;
977
+ flex-direction: column;
978
+ overflow: hidden;
979
+ transform: scale(0.95);
980
+ transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
981
+ }
982
+
983
+ /* Window Title Bar */
984
+ .window-header {
985
+ height: 38px;
986
+ background: linear-gradient(to bottom, #3a3a3a, #2b2b2b);
987
+ border-bottom: 1px solid #000;
988
+ display: flex;
989
+ align-items: center;
990
+ padding: 0 16px;
991
+ flex-shrink: 0;
992
+ }
993
+
994
+ /* Traffic Light Buttons */
995
+ .window-controls {
996
+ display: flex;
997
+ gap: 8px;
998
+ }
999
+
1000
+ .control-dot {
1001
+ width: 12px;
1002
+ height: 12px;
1003
+ border-radius: 50%;
1004
+ border: 1px solid rgba(0,0,0,0.2);
1005
+ }
1006
+
1007
+ .close-dot { background-color: #ff5f56; cursor: pointer; }
1008
+ .close-dot:hover { background-color: #ff3b30; } /* Brightens on hover */
1009
+ .minimize-dot { background-color: #ffbd2e; }
1010
+ .expand-dot { background-color: #27c93f; }
1011
+
1012
+ .window-title {
1013
+ color: #d1d1d1;
1014
+ font-size: 13px;
1015
+ font-weight: 500;
1016
+ margin-left: 20px;
1017
+ flex-grow: 1;
1018
+ text-align: center;
1019
+ padding-right: 60px; /* Balance the title */
1020
+ }
1021
+
1022
+ /* Content Area */
1023
+ .window-content {
1024
+ padding: 20px;
1025
+ overflow-y: auto;
1026
+ color: #fff;
1027
+ }
1028
+
1029
+ /* Grid for Tiles */
1030
+ .tiles-grid {
1031
+ display: grid;
1032
+ grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
1033
+ gap: 16px;
1034
+ }
1035
+
1036
+ /* Individual Tile Style */
1037
+ .tile {
1038
+ background-color: #2c2c2e;
1039
+ border: 1px solid #3a3a3c;
1040
+ border-radius: 8px;
1041
+ padding: 16px;
1042
+ display: flex;
1043
+ flex-direction: column;
1044
+ gap: 8px;
1045
+ transition: background-color 0.2s;
1046
+ }
1047
+
1048
+ .tile:hover {
1049
+ background-color: #3a3a3c;
1050
+ }
1051
+
1052
+ .tile-icon {
1053
+ font-size: 32px;
1054
+ }
1055
+
1056
+ .tile-name {
1057
+ font-size: 16px;
1058
+ font-weight: 700;
1059
+ color: #fff;
1060
+ text-transform: capitalize;
1061
+ }
1062
+
1063
+ .tile-desc {
1064
+ font-size: 13px;
1065
+ line-height: 1.4;
1066
+ color: #a1a1a6;
1067
+ }
1068
+
1069
+ /* Scrollbar Styling */
1070
+ .window-content::-webkit-scrollbar {
1071
+ width: 8px;
1072
+ }
1073
+ .window-content::-webkit-scrollbar-track {
1074
+ background: #1e1e1e;
1075
+ }
1076
+ .window-content::-webkit-scrollbar-thumb {
1077
+ background: #48484a;
1078
+ border-radius: 4px;
1079
+ }
1080
+
1081
+ /* Animation States */
1082
+ #modal-overlay.active {
1083
+ display: flex;
1084
+ opacity: 1;
1085
+ }
1086
+
1087
+ #modal-overlay.active #macos-window {
1088
+ transform: scale(1);
1089
+ }
1090
+ </style>
1091
+ </head>
1092
+ <body>
1093
+
1094
+ <!-- 1. The Trigger Button -->
1095
+
1096
+ <!-- 2. The Modal Structure -->
1097
+ <div id="modal-overlay">
1098
+ <div id="macos-window">
1099
+ <!-- Header with Red Button -->
1100
+ <div class="window-header">
1101
+ <div class="window-controls">
1102
+ <div class="control-dot close-dot" id="close-btn" title="Close"></div>
1103
+ </div>
1104
+
1105
+ <div class="window-title">COCO Dataset Classes (80 Objects)</div>
1106
+ </div>
1107
+
1108
+ <!-- Content -->
1109
+ <div class="window-content">
1110
+ <div style="margin-bottom: 20px; color: #a1a1a6; font-size: 14px;">
1111
+ This AI model is trained to see the world like you do. Below are the 80 different things it can instantly recognize in a photo.
1112
+ </div>
1113
+ <div class="tiles-grid" id="tiles-container">
1114
+ <!-- Tiles injected via JS -->
1115
+ </div>
1116
+ </div>
1117
+ </div>
1118
+ </div>
1119
+
1120
+ <script>
1121
+ // Data: 80 COCO Classes with Emojis and Kid-Friendly Explanations
1122
+ const cocoData = [
1123
+ { name: "person", emoji: "πŸ‘€", desc: "A human being, like you, your friends, or your teacher." },
1124
+ { name: "bicycle", emoji: "🚲", desc: "A two-wheeled vehicle that you pedal to ride." },
1125
+ { name: "car", emoji: "πŸš—", desc: "A vehicle with four wheels used to drive on roads." },
1126
+ { name: "motorcycle", emoji: "🏍️", desc: "Like a bicycle, but with a fast engine and heavier wheels." },
1127
+ { name: "airplane", emoji: "✈️", desc: "A flying machine with wings that carries passengers across the sky." },
1128
+ { name: "bus", emoji: "🚌", desc: "A large vehicle that carries many people along a set route." },
1129
+ { name: "train", emoji: "πŸš†", desc: "A series of connected cars that run on a metal track." },
1130
+ { name: "truck", emoji: "🚚", desc: "A large, heavy vehicle used for carrying cargo or big loads." },
1131
+ { name: "boat", emoji: "β›΅", desc: "A vehicle designed to float and travel on water." },
1132
+ { name: "traffic light", emoji: "🚦", desc: "A signal with red, yellow, and green lights to control cars." },
1133
+ { name: "fire hydrant", emoji: "πŸš’", desc: "A pipe on the street that firefighters use to get water." },
1134
+ { name: "stop sign", emoji: "πŸ›‘", desc: "A red octagon sign that tells drivers to stop moving." },
1135
+ { name: "parking meter", emoji: "πŸ…ΏοΈ", desc: "A machine where you pay money to park your car on the street." },
1136
+ { name: "bench", emoji: "πŸͺ‘", desc: "A long seat for several people, usually found in parks." },
1137
+ { name: "bird", emoji: "🐦", desc: "An animal with feathers and wings that can usually fly." },
1138
+ { name: "cat", emoji: "🐈", desc: "A small, furry pet that purrs and catches mice." },
1139
+ { name: "dog", emoji: "πŸ•", desc: "A loyal pet with four legs that barks and loves to play." },
1140
+ { name: "horse", emoji: "🐎", desc: "A large, strong animal that people can ride." },
1141
+ { name: "sheep", emoji: "πŸ‘", desc: "A fluffy farm animal that gives us wool for clothes." },
1142
+ { name: "cow", emoji: "πŸ„", desc: "A large farm animal that gives us milk." },
1143
+ { name: "elephant", emoji: "🐘", desc: "A huge animal with big ears and a long trunk." },
1144
+ { name: "bear", emoji: "🐻", desc: "A large, strong wild animal with thick fur." },
1145
+ { name: "zebra", emoji: "πŸ¦“", desc: "A wild horse-like animal with black and white stripes." },
1146
+ { name: "giraffe", emoji: "πŸ¦’", desc: "The tallest animal, with a very long neck to eat tree leaves." },
1147
+ { name: "backpack", emoji: "πŸŽ’", desc: "A bag you carry on your back to hold books and supplies." },
1148
+ { name: "umbrella", emoji: "β˜‚οΈ", desc: "A tool you hold over your head to stay dry in the rain." },
1149
+ { name: "handbag", emoji: "πŸ‘œ", desc: "A small bag used to carry personal items like a wallet." },
1150
+ { name: "tie", emoji: "πŸ‘”", desc: "A long piece of cloth worn around the neck with a suit." },
1151
+ { name: "suitcase", emoji: "🧳", desc: "A large bag used for packing clothes when traveling." },
1152
+ { name: "frisbee", emoji: "πŸ₯", desc: "A plastic disc you throw to a friend or dog." },
1153
+ { name: "skis", emoji: "⛷️", desc: "Long, flat runners you attach to boots to glide on snow." },
1154
+ { name: "snowboard", emoji: "πŸ‚", desc: "A single wide board you stand on to surf down snowy hills." },
1155
+ { name: "sports ball", emoji: "⚽", desc: "Any round object used in games like soccer, basketball, or tennis." },
1156
+ { name: "kite", emoji: "πŸͺ", desc: "A light frame with paper or cloth that flies in the wind." },
1157
+ { name: "baseball bat", emoji: "⚾", desc: "A smooth wooden or metal stick used to hit a baseball." },
1158
+ { name: "baseball glove", emoji: "🧀", desc: "A leather mitt worn to catch a baseball safely." },
1159
+ { name: "skateboard", emoji: "πŸ›Ή", desc: "A short board with wheels that you stand on and ride." },
1160
+ { name: "surfboard", emoji: "πŸ„", desc: "A long board used to ride ocean waves." },
1161
+ { name: "tennis racket", emoji: "🎾", desc: "A bat with a net mesh used to hit a tennis ball." },
1162
+ { name: "bottle", emoji: "🍾", desc: "A container with a narrow neck for holding liquids." },
1163
+ { name: "wine glass", emoji: "🍷", desc: "A fancy glass with a stem, used for special drinks." },
1164
+ { name: "cup", emoji: "β˜•", desc: "A small open container for drinking tea or coffee." },
1165
+ { name: "fork", emoji: "🍴", desc: "A tool with prongs used to pick up food." },
1166
+ { name: "knife", emoji: "πŸ”ͺ", desc: "A tool with a sharp edge used for cutting food." },
1167
+ { name: "spoon", emoji: "πŸ₯„", desc: "A tool with a small scoop for eating soup or cereal." },
1168
+ { name: "bowl", emoji: "πŸ₯£", desc: "A round, deep dish used for soup or cereal." },
1169
+ { name: "banana", emoji: "🍌", desc: "A long, curved yellow fruit that you peel to eat." },
1170
+ { name: "apple", emoji: "🍎", desc: "A round red or green fruit that is crunchy and sweet." },
1171
+ { name: "sandwich", emoji: "πŸ₯ͺ", desc: "Two slices of bread with meat, cheese, or veggies inside." },
1172
+ { name: "orange", emoji: "🍊", desc: "A round citrus fruit with a thick skin and juicy inside." },
1173
+ { name: "broccoli", emoji: "πŸ₯¦", desc: "A green vegetable that looks like a little tree." },
1174
+ { name: "carrot", emoji: "πŸ₯•", desc: "A crunchy orange vegetable that grows underground." },
1175
+ { name: "hot dog", emoji: "🌭", desc: "A cooked sausage served in a long, soft bun." },
1176
+ { name: "pizza", emoji: "πŸ•", desc: "A round dough base topped with tomato sauce and cheese." },
1177
+ { name: "donut", emoji: "🍩", desc: "A sweet, fried ring of dough, often with frosting." },
1178
+ { name: "cake", emoji: "πŸŽ‚", desc: "A sweet baked dessert often eaten at birthday parties." },
1179
+ { name: "chair", emoji: "πŸͺ‘", desc: "A piece of furniture designed for one person to sit on." },
1180
+ { name: "couch", emoji: "πŸ›‹οΈ", desc: "A soft, long seat where multiple people can relax." },
1181
+ { name: "potted plant", emoji: "πŸͺ΄", desc: "A plant grown inside a container for decoration." },
1182
+ { name: "bed", emoji: "πŸ›οΈ", desc: "A piece of furniture with a mattress for sleeping." },
1183
+ { name: "dining table", emoji: "🍽️", desc: "A large table where families sit to eat meals." },
1184
+ { name: "toilet", emoji: "🚽", desc: "A bathroom fixture used for getting rid of waste." },
1185
+ { name: "tv", emoji: "πŸ“Ί", desc: "An electronic screen for watching shows and movies." },
1186
+ { name: "laptop", emoji: "πŸ’»", desc: "A portable computer that you can use on your lap." },
1187
+ { name: "mouse", emoji: "πŸ–±οΈ", desc: "A handheld device used to move the cursor on a computer." },
1188
+ { name: "remote", emoji: "πŸ“‘", desc: "A controller used to change channels on a TV from afar." },
1189
+ { name: "keyboard", emoji: "⌨️", desc: "A board with buttons for typing letters into a computer." },
1190
+ { name: "cell phone", emoji: "πŸ“±", desc: "A small phone you can carry in your pocket." },
1191
+ { name: "microwave", emoji: "​​​​​​⏲️", desc: "An oven that heats food very quickly." },
1192
+ { name: "oven", emoji: "πŸ₯˜", desc: "A kitchen appliance used for baking and roasting food." },
1193
+ { name: "toaster", emoji: "🍞", desc: "A machine that browns bread slices." },
1194
+ { name: "sink", emoji: "🚰", desc: "A basin with a faucet for washing hands or dishes." },
1195
+ { name: "refrigerator", emoji: "❄️", desc: "A cold closet that keeps food fresh." },
1196
+ { name: "book", emoji: "πŸ“–", desc: "A set of pages with writing or pictures to read." },
1197
+ { name: "clock", emoji: "⏰", desc: "A device that tells you what time it is." },
1198
+ { name: "vase", emoji: "🏺", desc: "A decorative container used for holding flowers." },
1199
+ { name: "scissors", emoji: "βœ‚οΈ", desc: "A tool with two blades used for cutting paper." },
1200
+ { name: "teddy bear", emoji: "🧸", desc: "A soft toy bear that is cuddly and cute." },
1201
+ { name: "hair drier", emoji: "πŸ’¨", desc: "A machine that blows hot air to dry wet hair." },
1202
+ { name: "toothbrush", emoji: "πŸͺ₯", desc: "A small brush used to clean your teeth." }
1203
+ ];
1204
+
1205
+ // DOM Elements
1206
+ const triggerBtn = document.getElementById('dev-trigger-btn');
1207
+ const modal = document.getElementById('modal-overlay');
1208
+ const closeBtn = document.getElementById('close-btn');
1209
+ const tilesContainer = document.getElementById('tiles-container');
1210
+ const macosWindow = document.getElementById('macos-window');
1211
+
1212
+ // 1. Populate the Grid
1213
+ function renderTiles() {
1214
+ tilesContainer.innerHTML = cocoData.map(item => `
1215
+ <div class="tile">
1216
+ <div class="tile-icon">${item.emoji}</div>
1217
+ <div class="tile-name">${item.name}</div>
1218
+ <div class="tile-desc">${item.desc}</div>
1219
+ </div>
1220
+ `).join('');
1221
+ }
1222
+
1223
+ // 2. Open Modal Function
1224
+ triggerBtn.addEventListener('click', () => {
1225
+ renderTiles(); // Render content on open
1226
+ modal.classList.add('active'); // Show modal
1227
+ });
1228
+
1229
+ // 3. Close Modal Function
1230
+ function closeModal() {
1231
+ modal.classList.remove('active');
1232
+ }
1233
+
1234
+ // Event: Click the Red Dot
1235
+ closeBtn.addEventListener('click', closeModal);
1236
+
1237
+ // Event: Click Outside the Window
1238
+ modal.addEventListener('click', (e) => {
1239
+ // If the user clicks the dark background (modal), close it.
1240
+ // If they click INSIDE the window, do nothing.
1241
+ if (e.target === modal) {
1242
+ closeModal();
1243
+ }
1244
+ });
1245
+
1246
+ </script>
1247
+ </body>
1248
+ </html>