webxos commited on
Commit
1b92d7c
·
verified ·
1 Parent(s): acbaa43

Upload matrixma_webxos2026.html

Browse files
Files changed (1) hide show
  1. matrixma_webxos2026.html +1652 -0
matrixma_webxos2026.html ADDED
@@ -0,0 +1,1652 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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, maximum-scale=1.0, user-scalable=no">
6
+ <title>MATRIX/MA DATASETS - by webXOS</title>
7
+
8
+ <!-- Core Libraries -->
9
+ <link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;500;700&display=swap" rel="stylesheet">
10
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
11
+ <script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs@latest"></script>
12
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.10.1/jszip.min.js"></script>
13
+ <script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
14
+
15
+ <style>
16
+ /* === ORIGINAL WEBXOS COLORS === */
17
+ :root {
18
+ --terminal-black: #000000;
19
+ --terminal-green: #00FF00;
20
+ --terminal-red: #FF0000;
21
+ --terminal-gray: #1E1E1E;
22
+ --terminal-light-gray: #2D2D2D;
23
+ --terminal-medium-gray: #3A3A3A;
24
+ --terminal-border: #7A7A7A;
25
+ --terminal-yellow: #FFFF00;
26
+ --terminal-blue: #0000FF;
27
+
28
+ /* Clean Terminal Colors */
29
+ --clean-bg: rgba(10, 10, 12, 0.98);
30
+ --clean-text: #E0E0E0;
31
+ --clean-accent: #00FF88;
32
+ --clean-border: #333344;
33
+ --clean-header: rgba(20, 20, 30, 0.95);
34
+ --hf-purple: #7C3AED;
35
+ }
36
+
37
+ * {
38
+ margin: 0;
39
+ padding: 0;
40
+ box-sizing: border-box;
41
+ font-family: 'JetBrains Mono', 'Courier New', monospace;
42
+ -webkit-tap-highlight-color: transparent;
43
+ }
44
+
45
+ body {
46
+ background-color: var(--terminal-black);
47
+ color: var(--terminal-green);
48
+ height: 100vh;
49
+ overflow: hidden;
50
+ display: flex;
51
+ flex-direction: column;
52
+ touch-action: manipulation;
53
+ }
54
+
55
+ /* === HF DATASET GENERATOR WINDOW === */
56
+ .hf-window {
57
+ position: fixed;
58
+ top: 50%;
59
+ left: 50%;
60
+ transform: translate(-50%, -50%);
61
+ width: 90%;
62
+ max-width: 1200px;
63
+ height: 85%;
64
+ background: var(--clean-bg);
65
+ border: 1px solid var(--clean-border);
66
+ border-radius: 8px;
67
+ box-shadow: 0 10px 50px rgba(0, 0, 0, 0.7);
68
+ display: none;
69
+ flex-direction: column;
70
+ z-index: 10000;
71
+ overflow: hidden;
72
+ }
73
+
74
+ .hf-window.active {
75
+ display: flex;
76
+ }
77
+
78
+ .hf-header {
79
+ background: var(--clean-header);
80
+ padding: 12px 20px;
81
+ border-bottom: 1px solid var(--clean-border);
82
+ display: flex;
83
+ justify-content: space-between;
84
+ align-items: center;
85
+ color: var(--clean-accent);
86
+ font-weight: 500;
87
+ }
88
+
89
+ .hf-title {
90
+ display: flex;
91
+ align-items: center;
92
+ gap: 10px;
93
+ }
94
+
95
+ .hf-title i {
96
+ color: var(--hf-purple);
97
+ }
98
+
99
+ .hf-controls {
100
+ display: flex;
101
+ gap: 8px;
102
+ }
103
+
104
+ .hf-btn {
105
+ background: rgba(124, 58, 237, 0.1);
106
+ border: 1px solid rgba(124, 58, 237, 0.3);
107
+ color: var(--hf-purple);
108
+ padding: 6px 12px;
109
+ border-radius: 4px;
110
+ cursor: pointer;
111
+ font-size: 0.8rem;
112
+ transition: all 0.2s;
113
+ }
114
+
115
+ .hf-btn:hover {
116
+ background: rgba(124, 58, 237, 0.2);
117
+ }
118
+
119
+ .hf-btn.primary {
120
+ background: rgba(0, 255, 136, 0.1);
121
+ border-color: rgba(0, 255, 136, 0.3);
122
+ color: var(--clean-accent);
123
+ }
124
+
125
+ .hf-btn.danger {
126
+ background: rgba(255, 0, 0, 0.1);
127
+ border-color: rgba(255, 0, 0, 0.3);
128
+ color: #ff6666;
129
+ }
130
+
131
+ .hf-btn.close {
132
+ background: rgba(255, 0, 0, 0.1);
133
+ border-color: rgba(255, 0, 0, 0.3);
134
+ color: #ff6666;
135
+ }
136
+
137
+ .hf-container {
138
+ flex: 1;
139
+ display: flex;
140
+ overflow: hidden;
141
+ padding: 20px;
142
+ gap: 20px;
143
+ }
144
+
145
+ .config-panel {
146
+ flex: 1;
147
+ display: flex;
148
+ flex-direction: column;
149
+ background: rgba(5, 5, 10, 0.8);
150
+ border: 1px solid var(--clean-border);
151
+ border-radius: 6px;
152
+ overflow: hidden;
153
+ min-width: 300px;
154
+ }
155
+
156
+ .config-header {
157
+ padding: 10px 15px;
158
+ background: rgba(15, 15, 25, 0.9);
159
+ border-bottom: 1px solid var(--clean-border);
160
+ color: var(--hf-purple);
161
+ font-size: 0.85rem;
162
+ display: flex;
163
+ justify-content: space-between;
164
+ align-items: center;
165
+ }
166
+
167
+ .config-content {
168
+ flex: 1;
169
+ padding: 15px;
170
+ overflow-y: auto;
171
+ color: var(--clean-text);
172
+ }
173
+
174
+ .config-section {
175
+ margin-bottom: 20px;
176
+ padding: 10px;
177
+ background: rgba(20, 20, 30, 0.3);
178
+ border-radius: 4px;
179
+ }
180
+
181
+ .section-title {
182
+ color: var(--hf-purple);
183
+ font-size: 0.9rem;
184
+ margin-bottom: 10px;
185
+ display: flex;
186
+ align-items: center;
187
+ gap: 8px;
188
+ }
189
+
190
+ .config-input {
191
+ margin-bottom: 12px;
192
+ }
193
+
194
+ .config-input label {
195
+ display: block;
196
+ font-size: 0.8rem;
197
+ color: var(--clean-text);
198
+ margin-bottom: 4px;
199
+ }
200
+
201
+ .config-input input, .config-input select {
202
+ width: 100%;
203
+ background: rgba(30, 30, 40, 0.8);
204
+ border: 1px solid var(--clean-border);
205
+ color: var(--clean-text);
206
+ padding: 6px 10px;
207
+ border-radius: 3px;
208
+ font-size: 0.8rem;
209
+ }
210
+
211
+ .config-input input:focus, .config-input select:focus {
212
+ outline: 1px solid var(--hf-purple);
213
+ }
214
+
215
+ .slider-container {
216
+ display: flex;
217
+ align-items: center;
218
+ gap: 10px;
219
+ }
220
+
221
+ .slider-value {
222
+ min-width: 40px;
223
+ text-align: center;
224
+ font-size: 0.8rem;
225
+ }
226
+
227
+ input[type="range"] {
228
+ flex: 1;
229
+ height: 4px;
230
+ background: rgba(30, 30, 40, 0.8);
231
+ border-radius: 2px;
232
+ outline: none;
233
+ -webkit-appearance: none;
234
+ }
235
+
236
+ input[type="range"]::-webkit-slider-thumb {
237
+ -webkit-appearance: none;
238
+ width: 16px;
239
+ height: 16px;
240
+ background: var(--hf-purple);
241
+ border-radius: 50%;
242
+ cursor: pointer;
243
+ }
244
+
245
+ .checkbox-group {
246
+ display: flex;
247
+ flex-direction: column;
248
+ gap: 6px;
249
+ margin-top: 5px;
250
+ }
251
+
252
+ .checkbox-item {
253
+ display: flex;
254
+ align-items: center;
255
+ gap: 6px;
256
+ font-size: 0.8rem;
257
+ }
258
+
259
+ .checkbox-item input[type="checkbox"] {
260
+ width: 14px;
261
+ height: 14px;
262
+ }
263
+
264
+ .terminal-panel {
265
+ flex: 2;
266
+ display: flex;
267
+ flex-direction: column;
268
+ background: rgba(5, 5, 10, 0.8);
269
+ border: 1px solid var(--clean-border);
270
+ border-radius: 6px;
271
+ overflow: hidden;
272
+ }
273
+
274
+ .terminal-header {
275
+ padding: 10px 15px;
276
+ background: rgba(15, 15, 25, 0.9);
277
+ border-bottom: 1px solid var(--clean-border);
278
+ color: var(--hf-purple);
279
+ font-size: 0.85rem;
280
+ display: flex;
281
+ justify-content: space-between;
282
+ align-items: center;
283
+ }
284
+
285
+ .terminal-output {
286
+ flex: 1;
287
+ padding: 15px;
288
+ overflow-y: auto;
289
+ font-size: 0.85rem;
290
+ line-height: 1.4;
291
+ color: var(--clean-text);
292
+ }
293
+
294
+ .terminal-line {
295
+ margin-bottom: 3px;
296
+ word-break: break-word;
297
+ white-space: pre-wrap;
298
+ animation: fadeIn 0.2s ease;
299
+ }
300
+
301
+ .terminal-line.command {
302
+ color: var(--hf-purple);
303
+ }
304
+
305
+ .terminal-line.output {
306
+ color: var(--clean-text);
307
+ }
308
+
309
+ .terminal-line.error {
310
+ color: #ff6666;
311
+ }
312
+
313
+ .terminal-line.success {
314
+ color: var(--clean-accent);
315
+ }
316
+
317
+ .terminal-line.info {
318
+ color: #66ccff;
319
+ }
320
+
321
+ .terminal-line.warning {
322
+ color: #ffcc00;
323
+ }
324
+
325
+ .terminal-line.hf {
326
+ color: var(--hf-purple);
327
+ }
328
+
329
+ .terminal-input {
330
+ padding: 10px 15px;
331
+ background: rgba(15, 15, 25, 0.9);
332
+ border-top: 1px solid var(--clean-border);
333
+ display: flex;
334
+ align-items: center;
335
+ gap: 10px;
336
+ }
337
+
338
+ .input-prompt {
339
+ color: var(--hf-purple);
340
+ font-weight: bold;
341
+ }
342
+
343
+ #hfInput {
344
+ flex: 1;
345
+ background: transparent;
346
+ border: none;
347
+ color: var(--clean-text);
348
+ font-family: 'JetBrains Mono', monospace;
349
+ font-size: 0.9rem;
350
+ outline: none;
351
+ }
352
+
353
+ .progress-container {
354
+ margin-top: 15px;
355
+ padding: 10px;
356
+ background: rgba(20, 20, 30, 0.5);
357
+ border-radius: 4px;
358
+ border: 1px solid var(--clean-border);
359
+ }
360
+
361
+ .progress-header {
362
+ display: flex;
363
+ justify-content: space-between;
364
+ margin-bottom: 8px;
365
+ font-size: 0.8rem;
366
+ }
367
+
368
+ .progress-bar {
369
+ height: 8px;
370
+ background: rgba(30, 30, 40, 0.8);
371
+ border-radius: 4px;
372
+ overflow: hidden;
373
+ }
374
+
375
+ .progress-fill {
376
+ height: 100%;
377
+ background: linear-gradient(90deg, var(--hf-purple), var(--clean-accent));
378
+ transition: width 0.3s ease;
379
+ width: 0%;
380
+ }
381
+
382
+ .progress-stats {
383
+ display: grid;
384
+ grid-template-columns: repeat(2, 1fr);
385
+ gap: 8px;
386
+ margin-top: 10px;
387
+ font-size: 0.75rem;
388
+ }
389
+
390
+ .stat-item {
391
+ display: flex;
392
+ justify-content: space-between;
393
+ }
394
+
395
+ .stat-label {
396
+ color: #aaa;
397
+ }
398
+
399
+ .stat-value {
400
+ color: var(--clean-text);
401
+ }
402
+
403
+ /* === LOADING SCREEN === */
404
+ .loading-screen {
405
+ position: fixed;
406
+ top: 0; left: 0; width: 100%; height: 100%;
407
+ background: var(--terminal-black);
408
+ display: flex; align-items: center; justify-content: center;
409
+ z-index: 9999; flex-direction: column;
410
+ font-size: 1.2rem;
411
+ text-align: center;
412
+ }
413
+
414
+ .webxos-logo {
415
+ font-size: 6rem;
416
+ font-weight: bold;
417
+ margin-bottom: 20px;
418
+ color: var(--hf-purple);
419
+ animation: glow 2s infinite alternate;
420
+ }
421
+
422
+ .loading-bar {
423
+ width: 400px; height: 20px;
424
+ background: var(--terminal-light-gray);
425
+ margin-top: 40px;
426
+ border-radius: 10px;
427
+ overflow: hidden;
428
+ border: 2px solid var(--hf-purple);
429
+ }
430
+
431
+ .loading-fill {
432
+ width: 0%; height: 100%;
433
+ background: var(--hf-purple);
434
+ transition: width 0.3s;
435
+ }
436
+
437
+ /* === TASKBAR === */
438
+ .taskbar {
439
+ height: 42px;
440
+ background: var(--terminal-gray);
441
+ border-top: 1px solid #fff;
442
+ display: flex;
443
+ align-items: center;
444
+ padding: 0 6px;
445
+ box-shadow: 0 -1px 3px rgba(0,0,0,0.5);
446
+ z-index: 1000;
447
+ position: fixed;
448
+ bottom: 0;
449
+ width: 100%;
450
+ }
451
+
452
+ .start-btn {
453
+ background: var(--terminal-black);
454
+ border: 1px outset var(--hf-purple);
455
+ padding: 4px 14px;
456
+ font-weight: bold;
457
+ color: var(--hf-purple);
458
+ cursor: pointer;
459
+ margin-right: 8px;
460
+ font-size: 1rem;
461
+ min-height: 32px;
462
+ }
463
+
464
+ .task-icon {
465
+ width: 32px; height: 32px;
466
+ background: var(--terminal-light-gray);
467
+ border: 1px solid var(--terminal-medium-gray);
468
+ display: flex;
469
+ align-items: center;
470
+ justify-content: center;
471
+ cursor: pointer;
472
+ font-size: 1rem;
473
+ color: var(--hf-purple);
474
+ margin-right: 6px;
475
+ }
476
+
477
+ .task-icon.active {
478
+ background: var(--hf-purple);
479
+ color: black;
480
+ }
481
+
482
+ .clock {
483
+ margin-left: auto;
484
+ font-size: 1rem;
485
+ padding: 0 10px;
486
+ }
487
+
488
+ /* === RESPONSIVE === */
489
+ @media (max-width: 768px) {
490
+ .hf-container {
491
+ flex-direction: column;
492
+ padding: 10px;
493
+ }
494
+
495
+ .hf-window {
496
+ width: 95%;
497
+ height: 90%;
498
+ }
499
+
500
+ .config-panel {
501
+ min-width: unset;
502
+ }
503
+
504
+ .webxos-logo {
505
+ font-size: 4rem;
506
+ }
507
+
508
+ .loading-bar {
509
+ width: 90%;
510
+ }
511
+ }
512
+
513
+ @keyframes fadeIn {
514
+ from { opacity: 0; transform: translateY(-5px); }
515
+ to { opacity: 1; transform: translateY(0); }
516
+ }
517
+
518
+ @keyframes glow {
519
+ 0% { text-shadow: 0 0 10px rgba(124, 58, 237, 0.5); }
520
+ 100% { text-shadow: 0 0 20px rgba(124, 58, 237, 0.8), 0 0 30px rgba(124, 58, 237, 0.6); }
521
+ }
522
+ </style>
523
+ </head>
524
+ <body>
525
+ <!-- HF DATASET GENERATOR WINDOW -->
526
+ <div class="hf-window" id="hfWindow">
527
+ <div class="hf-header">
528
+ <div class="hf-title">
529
+ <i class="fas fa-database"></i>
530
+ <span>MATRIX/MA DATASETS by webXOS</span>
531
+ </div>
532
+ <div class="hf-controls">
533
+ <button class="hf-btn primary" onclick="hfGenerator.generateDataset()">
534
+ <i class="fas fa-play"></i> Generate Dataset
535
+ </button>
536
+ <button class="hf-btn" onclick="hfGenerator.exportDataset()" id="exportBtn" disabled>
537
+ <i class="fas fa-file-export"></i> Export ZIP
538
+ </button>
539
+ <button class="hf-btn close" onclick="closeHFWindow()">
540
+ <i class="fas fa-times"></i> Close
541
+ </button>
542
+ </div>
543
+ </div>
544
+ <div class="hf-container">
545
+ <div class="config-panel">
546
+ <div class="config-header">
547
+ <span>DATASET CONFIGURATION</span>
548
+ <span id="configStatus">READY</span>
549
+ </div>
550
+ <div class="config-content">
551
+ <div class="config-section">
552
+ <div class="section-title">
553
+ <i class="fas fa-sliders-h"></i>
554
+ <span>Dataset Parameters</span>
555
+ </div>
556
+ <div class="config-input">
557
+ <label>Dataset Name</label>
558
+ <input type="text" id="datasetName" value="matrix_operations" placeholder="Enter dataset name">
559
+ </div>
560
+ <div class="config-input">
561
+ <label>Number of Samples</label>
562
+ <div class="slider-container">
563
+ <input type="range" id="sampleCount" min="10" max="5000" value="500" step="10">
564
+ <span class="slider-value" id="sampleCountValue">500</span>
565
+ </div>
566
+ </div>
567
+ <div class="config-input">
568
+ <label>Matrix Dimensions</label>
569
+ <div class="slider-container">
570
+ <input type="range" id="matrixSize" min="2" max="16" value="8" step="2">
571
+ <span class="slider-value" id="matrixSizeValue">8×8</span>
572
+ </div>
573
+ </div>
574
+ <div class="config-input">
575
+ <label>Data Format</label>
576
+ <select id="dataFormat">
577
+ <option value="jsonl">JSON Lines (.jsonl)</option>
578
+ <option value="csv">CSV (.csv)</option>
579
+ <option value="json">JSON (.json)</option>
580
+ </select>
581
+ </div>
582
+ <div class="config-input">
583
+ <label>Train/Test Split</label>
584
+ <div class="slider-container">
585
+ <input type="range" id="trainSplit" min="50" max="100" value="80" step="5">
586
+ <span class="slider-value" id="trainSplitValue">80% Train</span>
587
+ </div>
588
+ </div>
589
+ </div>
590
+
591
+ <div class="config-section">
592
+ <div class="section-title">
593
+ <i class="fas fa-cogs"></i>
594
+ <span>Operations</span>
595
+ </div>
596
+ <div class="checkbox-group">
597
+ <div class="checkbox-item">
598
+ <input type="checkbox" id="opMatmul" checked>
599
+ <label for="opMatmul">Matrix Multiplication</label>
600
+ </div>
601
+ <div class="checkbox-item">
602
+ <input type="checkbox" id="opAdd" checked>
603
+ <label for="opAdd">Matrix Addition</label>
604
+ </div>
605
+ <div class="checkbox-item">
606
+ <input type="checkbox" id="opTranspose">
607
+ <label for="opTranspose">Matrix Transpose</label>
608
+ </div>
609
+ <div class="checkbox-item">
610
+ <input type="checkbox" id="opInverse">
611
+ <label for="opInverse">Matrix Inverse</label>
612
+ </div>
613
+ </div>
614
+ </div>
615
+
616
+ <div class="config-section">
617
+ <div class="section-title">
618
+ <i class="fas fa-file-alt"></i>
619
+ <span>Metadata</span>
620
+ </div>
621
+ <div class="config-input">
622
+ <label>Description</label>
623
+ <input type="text" id="datasetDesc" value="Synthetic matrix operations dataset for ML training" placeholder="Dataset description">
624
+ </div>
625
+ <div class="config-input">
626
+ <label>License</label>
627
+ <select id="datasetLicense">
628
+ <option value="apache-2.0">Apache 2.0</option>
629
+ <option value="mit">MIT</option>
630
+ <option value="cc-by-4.0">CC-BY-4.0</option>
631
+ <option value="cc-by-sa-4.0">CC-BY-SA-4.0</option>
632
+ </select>
633
+ </div>
634
+ </div>
635
+
636
+ <div class="progress-container">
637
+ <div class="progress-header">
638
+ <span>Generation Progress</span>
639
+ <span id="progressPercent">0%</span>
640
+ </div>
641
+ <div class="progress-bar">
642
+ <div class="progress-fill" id="progressFill"></div>
643
+ </div>
644
+ <div class="progress-stats">
645
+ <div class="stat-item">
646
+ <span class="stat-label">Samples:</span>
647
+ <span class="stat-value" id="statSamples">0/500</span>
648
+ </div>
649
+ <div class="stat-item">
650
+ <span class="stat-label">Size:</span>
651
+ <span class="stat-value" id="statSize">0 KB</span>
652
+ </div>
653
+ <div class="stat-item">
654
+ <span class="stat-label">Time:</span>
655
+ <span class="stat-value" id="statTime">0s</span>
656
+ </div>
657
+ <div class="stat-item">
658
+ <span class="stat-label">Format:</span>
659
+ <span class="stat-value" id="statFormat">jsonl</span>
660
+ </div>
661
+ </div>
662
+ </div>
663
+ </div>
664
+ </div>
665
+
666
+ <div class="terminal-panel">
667
+ <div class="terminal-header">
668
+ <span>GENERATION TERMINAL</span>
669
+ <span id="terminalStatus">READY</span>
670
+ </div>
671
+ <div class="terminal-output" id="terminalOutput">
672
+ <div class="terminal-line hf">⟩⟩ MATRIXMA DATASETS Dataset Generator v2.2</div>
673
+ <div class="terminal-line output">Fixed Hugging Face schema compatibility</div>
674
+ <div class="terminal-line output">All exports validated for HF Hub upload</div>
675
+ <div class="terminal-line output">Configure parameters and click "Generate Dataset"</div>
676
+ </div>
677
+ <div class="terminal-input">
678
+ <div class="input-prompt">⟩⟩</div>
679
+ <input type="text" id="hfInput" placeholder="Enter command (help for options)..." autocomplete="off">
680
+ <button class="hf-btn" onclick="hfGenerator.executeCommand()">Execute</button>
681
+ </div>
682
+ </div>
683
+ </div>
684
+ </div>
685
+
686
+ <!-- LOADING SCREEN -->
687
+ <div class="loading-screen" id="loadingScreen">
688
+ <div class="webxos-logo">MATRIX/MA DATASETS</div>
689
+ <div>v2.2 - by webXOS 2026</div>
690
+ <div class="loading-bar"><div class="loading-fill" id="loadingFill"></div></div>
691
+ </div>
692
+
693
+ <!-- TASKBAR -->
694
+ <div class="taskbar" id="taskbar" style="display: none;">
695
+ <button class="start-btn" onclick="openHFWindow()">MATRIX MULTIPLIER DATASET GEN</button>
696
+ <div class="task-icon" onclick="openHFWindow()">
697
+ <i class="fas fa-database"></i>
698
+ </div>
699
+ <div class="clock" id="clock">00:00:00</div>
700
+ </div>
701
+
702
+ <script>
703
+ // ==================== HF DATASET GENERATOR v2.2 ====================
704
+ class HFDatasetGenerator {
705
+ constructor() {
706
+ this.tfReady = false;
707
+ this.isGenerating = false;
708
+ this.dataset = { train: [], test: [] };
709
+ this.metadata = {
710
+ name: "matrix_operations",
711
+ description: "Synthetic matrix operations dataset",
712
+ license: "apache-2.0",
713
+ format: "jsonl",
714
+ generated_at: null,
715
+ splits: { train: 0, test: 0 }
716
+ };
717
+ this.stats = {
718
+ samples: 0,
719
+ totalSamples: 500,
720
+ startTime: 0,
721
+ sizeKB: 0,
722
+ backend: 'unknown'
723
+ };
724
+
725
+ this.init();
726
+ this.setupConfigListeners();
727
+ }
728
+
729
+ async init() {
730
+ this.printTerminal("Initializing HF Dataset Generator v2.2 (HF Schema Fixed)...", "hf");
731
+ this.printTerminal("Fixed schema compatibility for Hugging Face Hub", "success");
732
+
733
+ try {
734
+ // Try WebGL first with proper fallback logging
735
+ try {
736
+ await tf.setBackend('webgl');
737
+ await tf.ready();
738
+ this.stats.backend = 'webgl';
739
+ this.printTerminal(`✓ TensorFlow.js backend: WebGL (GPU)`, "success");
740
+ } catch (webglError) {
741
+ this.printTerminal(`WebGL failed: ${webglError.message}`, "warning");
742
+ this.printTerminal("Falling back to CPU backend...", "warning");
743
+ await tf.setBackend('cpu');
744
+ await tf.ready();
745
+ this.stats.backend = 'cpu';
746
+ this.printTerminal(`✓ TensorFlow.js backend: CPU`, "info");
747
+ }
748
+
749
+ this.tfReady = true;
750
+ this.printTerminal("System ready for Hugging Face compatible dataset generation", "success");
751
+ this.updateStatus("IDLE");
752
+
753
+ } catch (error) {
754
+ this.printTerminal(`Initialization error: ${error.message}`, "error");
755
+ }
756
+ }
757
+
758
+ setupConfigListeners() {
759
+ // Update slider values
760
+ document.getElementById('sampleCount').addEventListener('input', (e) => {
761
+ const value = e.target.value;
762
+ document.getElementById('sampleCountValue').textContent = value;
763
+ this.stats.totalSamples = parseInt(value);
764
+ document.getElementById('statSamples').textContent = `0/${value}`;
765
+ });
766
+
767
+ document.getElementById('matrixSize').addEventListener('input', (e) => {
768
+ const size = e.target.value;
769
+ document.getElementById('matrixSizeValue').textContent = `${size}×${size}`;
770
+ });
771
+
772
+ document.getElementById('trainSplit').addEventListener('input', (e) => {
773
+ const value = e.target.value;
774
+ document.getElementById('trainSplitValue').textContent = `${value}% Train`;
775
+ });
776
+
777
+ // Update format display
778
+ document.getElementById('dataFormat').addEventListener('change', (e) => {
779
+ const format = e.target.value;
780
+ document.getElementById('statFormat').textContent = format;
781
+ });
782
+ }
783
+
784
+ async generateDataset() {
785
+ if (this.isGenerating) {
786
+ this.printTerminal("Dataset generation already in progress", "warning");
787
+ return;
788
+ }
789
+
790
+ this.isGenerating = true;
791
+ this.dataset = { train: [], test: [] };
792
+ this.updateStatus("GENERATING");
793
+
794
+ // Get configuration
795
+ const config = this.getConfig();
796
+ const trainSplit = config.trainSplit;
797
+ const trainCount = Math.floor(config.sampleCount * (trainSplit / 100));
798
+ const testCount = config.sampleCount - trainCount;
799
+
800
+ this.metadata = {
801
+ name: config.name,
802
+ description: config.description,
803
+ license: config.license,
804
+ format: config.format,
805
+ generated_at: new Date().toISOString(),
806
+ operations: config.operations,
807
+ matrix_size: config.matrixSize,
808
+ backend: this.stats.backend,
809
+ splits: { train: trainCount, test: testCount }
810
+ };
811
+
812
+ this.stats = {
813
+ samples: 0,
814
+ totalSamples: config.sampleCount,
815
+ startTime: performance.now(),
816
+ sizeKB: 0,
817
+ backend: this.stats.backend
818
+ };
819
+
820
+ this.printTerminal(`Starting dataset generation: ${config.name}`, "hf");
821
+ this.printTerminal(`Backend: ${this.stats.backend.toUpperCase()}`, "info");
822
+ this.printTerminal(`Samples: ${config.sampleCount} (Train: ${trainCount}, Test: ${testCount})`, "info");
823
+ this.printTerminal(`Matrix: ${config.matrixSize}×${config.matrixSize}`, "info");
824
+ this.printTerminal(`Operations: ${config.operations.join(', ')}`, "info");
825
+ this.printTerminal(`Format: ${config.format}`, "info");
826
+
827
+ // Update progress UI
828
+ this.updateProgress(0);
829
+ document.getElementById('exportBtn').disabled = true;
830
+
831
+ // Generate samples
832
+ for (let i = 0; i < config.sampleCount; i++) {
833
+ if (!this.isGenerating) break;
834
+
835
+ const sample = await this.generateSample(config.matrixSize, config.operations);
836
+
837
+ // Split into train/test
838
+ if (i < trainCount) {
839
+ this.dataset.train.push(sample);
840
+ } else {
841
+ this.dataset.test.push(sample);
842
+ }
843
+
844
+ this.stats.samples = i + 1;
845
+
846
+ // Update progress every 10 samples or at the end
847
+ if ((i + 1) % 10 === 0 || i === config.sampleCount - 1) {
848
+ const progress = ((i + 1) / config.sampleCount) * 100;
849
+ this.updateProgress(progress);
850
+
851
+ // Update stats
852
+ const elapsed = (performance.now() - this.stats.startTime) / 1000;
853
+ const size = this.calculateSize();
854
+ document.getElementById('statTime').textContent = `${elapsed.toFixed(1)}s`;
855
+ document.getElementById('statSize').textContent = `${size} KB`;
856
+ document.getElementById('statSamples').textContent = `${i + 1}/${config.sampleCount}`;
857
+
858
+ if ((i + 1) % 100 === 0) {
859
+ this.printTerminal(`Generated ${i + 1}/${config.sampleCount} samples`, "output");
860
+ }
861
+ }
862
+
863
+ // Yield to UI every 20 samples
864
+ if (i % 20 === 0) await new Promise(resolve => setTimeout(resolve, 0));
865
+ }
866
+
867
+ if (this.isGenerating) {
868
+ const elapsed = ((performance.now() - this.stats.startTime) / 1000).toFixed(2);
869
+ const size = this.calculateSize();
870
+
871
+ this.printTerminal(`Dataset generation complete!`, "success");
872
+ this.printTerminal(`✓ ${config.sampleCount} samples in ${elapsed}s`, "success");
873
+ this.printTerminal(`✓ ${trainCount} train samples, ${testCount} test samples`, "success");
874
+ this.printTerminal(`✓ Total size: ${size} KB`, "success");
875
+ this.printTerminal(`✓ Ready for Hugging Face Hub upload`, "success");
876
+
877
+ this.updateStatus("COMPLETE");
878
+ document.getElementById('exportBtn').disabled = false;
879
+ this.showDatasetSummary();
880
+ }
881
+
882
+ this.isGenerating = false;
883
+ }
884
+
885
+ async generateSample(matrixSize, operations) {
886
+ const sampleId = `sample_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`;
887
+ const sample = {
888
+ id: sampleId,
889
+ timestamp: new Date().toISOString(),
890
+ matrix_size: matrixSize,
891
+ operations: []
892
+ };
893
+
894
+ // Generate random matrices
895
+ const matrixA = tf.randomNormal([matrixSize, matrixSize], 0, 1);
896
+ const matrixB = tf.randomNormal([matrixSize, matrixSize], 0, 1);
897
+
898
+ // Perform selected operations
899
+ for (const op of operations) {
900
+ let result, time, operationData = { type: op };
901
+
902
+ try {
903
+ const start = performance.now();
904
+
905
+ switch(op) {
906
+ case 'matmul':
907
+ result = tf.matMul(matrixA, matrixB);
908
+ await result.data();
909
+ time = performance.now() - start;
910
+ operationData.time_ms = time;
911
+ operationData.matrix_a = Array.from(matrixA.dataSync());
912
+ operationData.matrix_b = Array.from(matrixB.dataSync());
913
+ operationData.result = Array.from(result.dataSync());
914
+ result.dispose();
915
+ break;
916
+
917
+ case 'add':
918
+ result = tf.add(matrixA, matrixB);
919
+ await result.data();
920
+ time = performance.now() - start;
921
+ operationData.time_ms = time;
922
+ operationData.matrix_a = Array.from(matrixA.dataSync());
923
+ operationData.matrix_b = Array.from(matrixB.dataSync());
924
+ operationData.result = Array.from(result.dataSync());
925
+ result.dispose();
926
+ break;
927
+
928
+ case 'transpose':
929
+ result = tf.transpose(matrixA);
930
+ await result.data();
931
+ time = performance.now() - start;
932
+ operationData.time_ms = time;
933
+ operationData.matrix = Array.from(matrixA.dataSync());
934
+ operationData.result = Array.from(result.dataSync());
935
+ result.dispose();
936
+ break;
937
+
938
+ case 'inverse':
939
+ // Create invertible matrix: identity + small random perturbation
940
+ const identity = tf.eye(matrixSize);
941
+ const perturbation = tf.randomNormal([matrixSize, matrixSize], 0, 0.1);
942
+ const invertibleMatrix = tf.add(identity, perturbation);
943
+
944
+ try {
945
+ result = tf.linalg.inv(invertibleMatrix);
946
+ await result.data();
947
+ time = performance.now() - start;
948
+ operationData.time_ms = time;
949
+ operationData.matrix = Array.from(invertibleMatrix.dataSync());
950
+ operationData.result = Array.from(result.dataSync());
951
+ result.dispose();
952
+ } catch (invError) {
953
+ operationData.time_ms = time;
954
+ operationData.matrix = Array.from(invertibleMatrix.dataSync());
955
+ operationData.result = [];
956
+ operationData.error = "Matrix not invertible";
957
+ }
958
+
959
+ identity.dispose();
960
+ perturbation.dispose();
961
+ invertibleMatrix.dispose();
962
+ break;
963
+ }
964
+
965
+ sample.operations.push(operationData);
966
+
967
+ } catch (error) {
968
+ this.printTerminal(`Error in operation ${op}: ${error.message}`, "error");
969
+ operationData.error = error.message;
970
+ sample.operations.push(operationData);
971
+ }
972
+ }
973
+
974
+ // Cleanup
975
+ matrixA.dispose();
976
+ matrixB.dispose();
977
+
978
+ return sample;
979
+ }
980
+
981
+ getConfig() {
982
+ const selectedOps = [];
983
+
984
+ if (document.getElementById('opMatmul').checked) selectedOps.push('matmul');
985
+ if (document.getElementById('opAdd').checked) selectedOps.push('add');
986
+ if (document.getElementById('opTranspose').checked) selectedOps.push('transpose');
987
+ if (document.getElementById('opInverse').checked) selectedOps.push('inverse');
988
+
989
+ return {
990
+ name: document.getElementById('datasetName').value,
991
+ sampleCount: parseInt(document.getElementById('sampleCount').value),
992
+ matrixSize: parseInt(document.getElementById('matrixSize').value),
993
+ format: document.getElementById('dataFormat').value,
994
+ description: document.getElementById('datasetDesc').value,
995
+ license: document.getElementById('datasetLicense').value,
996
+ trainSplit: parseInt(document.getElementById('trainSplit').value),
997
+ operations: selectedOps
998
+ };
999
+ }
1000
+
1001
+ calculateSize() {
1002
+ const allData = [...this.dataset.train, ...this.dataset.test];
1003
+ const jsonString = JSON.stringify(allData);
1004
+ return (new TextEncoder().encode(jsonString).length / 1024).toFixed(2);
1005
+ }
1006
+
1007
+ async exportDataset() {
1008
+ if (this.dataset.train.length === 0 && this.dataset.test.length === 0) {
1009
+ this.printTerminal("No dataset to export. Generate a dataset first.", "warning");
1010
+ return;
1011
+ }
1012
+
1013
+ this.printTerminal("Preparing dataset for Hugging Face export...", "hf");
1014
+ this.updateStatus("EXPORTING");
1015
+
1016
+ const config = this.getConfig();
1017
+ const zip = new JSZip();
1018
+
1019
+ // Create dataset folder structure
1020
+ const datasetFolder = zip.folder(config.name);
1021
+
1022
+ // Export based on format
1023
+ switch(config.format) {
1024
+ case 'jsonl':
1025
+ if (this.dataset.train.length > 0) {
1026
+ const trainJsonl = this.dataset.train.map(s => JSON.stringify(s)).join('\n');
1027
+ datasetFolder.file("train.jsonl", trainJsonl);
1028
+ }
1029
+ if (this.dataset.test.length > 0) {
1030
+ const testJsonl = this.dataset.test.map(s => JSON.stringify(s)).join('\n');
1031
+ datasetFolder.file("test.jsonl", testJsonl);
1032
+ }
1033
+ break;
1034
+
1035
+ case 'json':
1036
+ if (this.dataset.train.length > 0) {
1037
+ datasetFolder.file("train.json", JSON.stringify(this.dataset.train, null, 2));
1038
+ }
1039
+ if (this.dataset.test.length > 0) {
1040
+ datasetFolder.file("test.json", JSON.stringify(this.dataset.test, null, 2));
1041
+ }
1042
+ break;
1043
+
1044
+ case 'csv':
1045
+ // CSV with complete data
1046
+ if (this.dataset.train.length > 0) {
1047
+ const trainCsv = this.convertToCSV(this.dataset.train);
1048
+ datasetFolder.file("train.csv", trainCsv);
1049
+ }
1050
+ if (this.dataset.test.length > 0) {
1051
+ const testCsv = this.convertToCSV(this.dataset.test);
1052
+ datasetFolder.file("test.csv", testCsv);
1053
+ }
1054
+ break;
1055
+ }
1056
+
1057
+ // Add metadata and documentation
1058
+ const readmeContent = this.generateReadme();
1059
+ datasetFolder.file("README.md", readmeContent);
1060
+
1061
+ const datasetCard = this.generateDatasetCard();
1062
+ datasetFolder.file("dataset_card.md", datasetCard);
1063
+
1064
+ const metadata = {
1065
+ ...this.metadata,
1066
+ samples: this.dataset.train.length + this.dataset.test.length,
1067
+ train_samples: this.dataset.train.length,
1068
+ test_samples: this.dataset.test.length,
1069
+ size_kb: this.calculateSize()
1070
+ };
1071
+ datasetFolder.file("metadata.json", JSON.stringify(metadata, null, 2));
1072
+
1073
+ // Add data loading script
1074
+ const loadScript = this.generateLoadScript(config);
1075
+ datasetFolder.file("load_dataset.py", loadScript);
1076
+
1077
+ // Generate and download ZIP
1078
+ try {
1079
+ const content = await zip.generateAsync({ type: "blob" });
1080
+ const filename = `${config.name}_hf_dataset.zip`;
1081
+
1082
+ const a = document.createElement("a");
1083
+ const url = URL.createObjectURL(content);
1084
+ a.href = url;
1085
+ a.download = filename;
1086
+ document.body.appendChild(a);
1087
+ a.click();
1088
+ document.body.removeChild(a);
1089
+ URL.revokeObjectURL(url);
1090
+
1091
+ this.printTerminal(`✓ Dataset exported as ${filename}`, "success");
1092
+ this.printTerminal("Ready for Hugging Face Hub upload:", "hf");
1093
+ this.printTerminal(" cd " + config.name, "output");
1094
+ this.printTerminal(" git init", "output");
1095
+ this.printTerminal(" git lfs install", "output");
1096
+ this.printTerminal(" git add .", "output");
1097
+ this.printTerminal(' git commit -m "Add dataset"', "output");
1098
+ this.printTerminal(` git push https://huggingface.co/datasets/your-username/${config.name}`, "output");
1099
+
1100
+ this.updateStatus("EXPORTED");
1101
+
1102
+ } catch (error) {
1103
+ this.printTerminal(`Export error: ${error.message}`, "error");
1104
+ this.updateStatus("ERROR");
1105
+ }
1106
+ }
1107
+
1108
+ convertToCSV(samples) {
1109
+ // Create CSV with simplified structure
1110
+ const rows = [];
1111
+
1112
+ // Header
1113
+ const headers = ['id', 'timestamp', 'matrix_size', 'operations_count'];
1114
+ rows.push(headers.join(','));
1115
+
1116
+ // Data rows
1117
+ for (const sample of samples) {
1118
+ const row = [
1119
+ `"${sample.id}"`,
1120
+ `"${sample.timestamp}"`,
1121
+ sample.matrix_size,
1122
+ sample.operations.length
1123
+ ];
1124
+ rows.push(row.join(','));
1125
+ }
1126
+
1127
+ return rows.join('\n');
1128
+ }
1129
+
1130
+ generateReadme() {
1131
+ const config = this.getConfig();
1132
+ const totalSamples = this.dataset.train.length + this.dataset.test.length;
1133
+ const totalBytes = this.calculateSize() * 1024;
1134
+
1135
+ // Correct Hugging Face YAML schema - using proper feature types
1136
+ return `---
1137
+ language:
1138
+ - en
1139
+ task_categories:
1140
+ - matrix-computation
1141
+ - synthetic-data-generation
1142
+ tags:
1143
+ - matrix-operations
1144
+ - synthetic-data
1145
+ - machine-learning
1146
+ - mathematics
1147
+ license: ${config.license}
1148
+ dataset_info:
1149
+ features:
1150
+ - name: id
1151
+ dtype: string
1152
+ - name: timestamp
1153
+ dtype: string
1154
+ - name: matrix_size
1155
+ dtype: int32
1156
+ - name: operations
1157
+ list:
1158
+ - name: type
1159
+ dtype: string
1160
+ - name: time_ms
1161
+ dtype: float32
1162
+ - name: matrix_a
1163
+ sequence: float32
1164
+ - name: matrix_b
1165
+ sequence: float32
1166
+ - name: matrix
1167
+ sequence: float32
1168
+ - name: result
1169
+ sequence: float32
1170
+ - name: error
1171
+ dtype: string
1172
+ splits:
1173
+ - name: train
1174
+ num_bytes: ${Math.round(totalBytes * (this.dataset.train.length / totalSamples))}
1175
+ num_examples: ${this.dataset.train.length}
1176
+ - name: test
1177
+ num_bytes: ${Math.round(totalBytes * (this.dataset.test.length / totalSamples))}
1178
+ num_examples: ${this.dataset.test.length}
1179
+ download_size: ${Math.round(totalBytes)}
1180
+ dataset_size: ${Math.round(totalBytes)}
1181
+ pretty_name: "${config.name}"
1182
+ size_categories:
1183
+ - ${totalSamples < 1000 ? 'n<1K' : totalSamples < 10000 ? '1K<n<10K' : '10K<n<100K'}
1184
+ ---
1185
+
1186
+ # ${config.name}
1187
+
1188
+ ${config.description}
1189
+
1190
+ ## Dataset Details
1191
+
1192
+ - **Generated:** ${new Date().toISOString()}
1193
+ - **Total Samples:** ${totalSamples}
1194
+ - **Splits:** Train (${this.dataset.train.length}), Test (${this.dataset.test.length})
1195
+ - **Matrix Size:** ${config.matrixSize}×${config.matrixSize}
1196
+ - **Operations:** ${config.operations.join(', ') || 'None selected'}
1197
+ - **Backend:** ${this.stats.backend.toUpperCase()}
1198
+ - **Format:** ${config.format}
1199
+
1200
+ ## Usage
1201
+
1202
+ \`\`\`python
1203
+ from datasets import load_dataset
1204
+
1205
+ # Load the dataset
1206
+ dataset = load_dataset("${config.name}")
1207
+
1208
+ # Access train and test splits
1209
+ train_dataset = dataset["train"]
1210
+ test_dataset = dataset["test"]
1211
+ \`\`\`
1212
+
1213
+ ## Example
1214
+
1215
+ \`\`\`python
1216
+ import datasets
1217
+
1218
+ # Load dataset
1219
+ ds = datasets.load_dataset("${config.name}")
1220
+
1221
+ # Get first example
1222
+ example = ds["train"][0]
1223
+ print(f"ID: {example['id']}")
1224
+ print(f"Matrix Size: {example['matrix_size']}")
1225
+ print(f"Operations: {len(example['operations'])}")
1226
+ \`\`\`
1227
+
1228
+ ## Citation
1229
+
1230
+ If you use this dataset in research, please cite:
1231
+
1232
+ \`\`\`bibtex
1233
+ @dataset{${config.name.replace(/[^a-z0-9]/gi, '_').toLowerCase()}_${new Date().getFullYear()},
1234
+ title = {${config.name}},
1235
+ author = {Generated by HF Dataset Generator v2.2},
1236
+ year = {${new Date().getFullYear()}},
1237
+ publisher = {Hugging Face},
1238
+ url = {https://huggingface.co/datasets/your-username/${config.name}}
1239
+ }
1240
+ \`\`\`
1241
+
1242
+ ## License
1243
+
1244
+ ${config.license}
1245
+ `;
1246
+ }
1247
+
1248
+ generateDatasetCard() {
1249
+ const config = this.getConfig();
1250
+ const totalSamples = this.dataset.train.length + this.dataset.test.length;
1251
+
1252
+ return `# Dataset Card for ${config.name}
1253
+
1254
+ ## Dataset Description
1255
+
1256
+ - **Homepage:** [Add homepage URL if available]
1257
+ - **Repository:** [Add repository URL]
1258
+ - **Point of Contact:** [Add contact name/email]
1259
+
1260
+ ### Dataset Summary
1261
+
1262
+ ${config.description}
1263
+
1264
+ This dataset was automatically generated using the HF Dataset Generator v2.2 with TensorFlow.js backend (${this.stats.backend}).
1265
+
1266
+ ### Supported Tasks
1267
+
1268
+ - Matrix operation prediction
1269
+ - Computational performance benchmarking
1270
+ - Synthetic data for ML training
1271
+ - Algorithm validation and testing
1272
+
1273
+ ### Languages
1274
+
1275
+ English
1276
+
1277
+ ## Dataset Structure
1278
+
1279
+ ### Data Instances
1280
+
1281
+ Each instance contains:
1282
+ - Unique sample ID
1283
+ - Generation timestamp
1284
+ - Matrix size (n×n)
1285
+ - List of operations performed with:
1286
+ - Operation type
1287
+ - Execution time in milliseconds
1288
+ - Input matrices
1289
+ - Result matrices
1290
+ - Error messages (if any)
1291
+
1292
+ ### Data Fields
1293
+
1294
+ - \`id\`: Unique identifier (string)
1295
+ - \`timestamp\`: Generation timestamp (string)
1296
+ - \`matrix_size\`: Dimension of matrices (int32)
1297
+ - \`operations\`: List of operations performed (list of dicts)
1298
+
1299
+ ### Data Splits
1300
+
1301
+ - **Train:** ${this.dataset.train.length} samples
1302
+ - **Test:** ${this.dataset.test.length} samples
1303
+
1304
+ ## Dataset Creation
1305
+
1306
+ ### Curation Rationale
1307
+
1308
+ This dataset was created to provide synthetic matrix operation data for machine learning research, benchmarking computational kernels, and testing numerical algorithms.
1309
+
1310
+ ### Source Data
1311
+
1312
+ Synthetically generated using TensorFlow.js matrix operations with random normal distributions.
1313
+
1314
+ ### Annotations
1315
+
1316
+ No human annotations.
1317
+
1318
+ ### Personal and Sensitive Information
1319
+
1320
+ None. All data is synthetically generated.
1321
+
1322
+ ## Considerations for Using the Data
1323
+
1324
+ ### Social Impact
1325
+
1326
+ This dataset enables research in computational mathematics, machine learning optimization, and numerical analysis education.
1327
+
1328
+ ### Discussion of Biases
1329
+
1330
+ Matrices are randomly generated from normal distributions (mean=0, std=1). Real-world matrices may have different distributions.
1331
+
1332
+ ### Other Known Limitations
1333
+
1334
+ 1. Matrix inverse may fail for singular matrices
1335
+ 2. Performance timing varies by hardware (${this.stats.backend} backend)
1336
+ 3. Limited to square matrices
1337
+
1338
+ ## Additional Information
1339
+
1340
+ ### Dataset Curators
1341
+
1342
+ Generated automatically by HF Dataset Generator v2.2
1343
+
1344
+ ### Licensing Information
1345
+
1346
+ ${config.license} License
1347
+
1348
+ ### Contributions
1349
+
1350
+ Thanks to TensorFlow.js and Hugging Face communities.
1351
+ `;
1352
+ }
1353
+
1354
+ generateLoadScript(config) {
1355
+ return `#!/usr/bin/env python3
1356
+ """
1357
+ Script to load and verify the ${config.name} dataset
1358
+ """
1359
+
1360
+ import json
1361
+ from pathlib import Path
1362
+
1363
+ def load_and_verify_dataset():
1364
+ dataset_path = Path(".")
1365
+
1366
+ print(f"Loading {config.name} dataset...")
1367
+
1368
+ # Load train split
1369
+ train_data = []
1370
+ if (dataset_path / "train.jsonl").exists():
1371
+ with open(dataset_path / "train.jsonl", "r") as f:
1372
+ for line in f:
1373
+ train_data.append(json.loads(line))
1374
+ print(f"Loaded {len(train_data)} train samples")
1375
+
1376
+ # Load test split
1377
+ test_data = []
1378
+ if (dataset_path / "test.jsonl").exists():
1379
+ with open(dataset_path / "test.jsonl", "r") as f:
1380
+ for line in f:
1381
+ test_data.append(json.loads(line))
1382
+ print(f"Loaded {len(test_data)} test samples")
1383
+
1384
+ # Basic validation
1385
+ print("\\nDataset Validation:")
1386
+ print(f"Total samples: {len(train_data) + len(test_data)}")
1387
+
1388
+ if train_data:
1389
+ sample = train_data[0]
1390
+ print(f"Sample keys: {list(sample.keys())}")
1391
+ print(f"Matrix size: {sample.get('matrix_size')}")
1392
+ print(f"Operations count: {len(sample.get('operations', []))}")
1393
+
1394
+ print("\\nDataset ready for use!")
1395
+ print("To upload to Hugging Face Hub:")
1396
+ print(f" git push https://huggingface.co/datasets/your-username/{config.name}")
1397
+
1398
+ if __name__ == "__main__":
1399
+ load_and_verify_dataset()
1400
+ `;
1401
+ }
1402
+
1403
+ showDatasetSummary() {
1404
+ const config = this.getConfig();
1405
+ const size = this.calculateSize();
1406
+ const elapsed = ((performance.now() - this.stats.startTime) / 1000).toFixed(2);
1407
+ const totalSamples = this.dataset.train.length + this.dataset.test.length;
1408
+
1409
+ let summary = `
1410
+ === DATASET SUMMARY ===
1411
+
1412
+ Name: ${config.name}
1413
+ Description: ${config.description}
1414
+ Total Samples: ${totalSamples}
1415
+ Train/Test: ${this.dataset.train.length}/${this.dataset.test.length}
1416
+ Matrix Size: ${config.matrixSize}×${config.matrixSize}
1417
+ Operations: ${config.operations.join(', ') || 'None'}
1418
+ Format: ${config.format}
1419
+ Backend: ${this.stats.backend.toUpperCase()}
1420
+ Size: ${size} KB
1421
+ Generation Time: ${elapsed}s
1422
+ License: ${config.license}
1423
+
1424
+ ✓ Hugging Face compatible schema
1425
+ ✓ Ready for HF Hub upload
1426
+ ✓ Includes train/test splits
1427
+ ✓ Validated YAML structure
1428
+ `.trim();
1429
+
1430
+ this.printTerminal(summary, "success");
1431
+ }
1432
+
1433
+ // UI Helper Methods
1434
+ printTerminal(message, type = "output") {
1435
+ const output = document.getElementById('terminalOutput');
1436
+ const line = document.createElement('div');
1437
+ line.className = `terminal-line ${type}`;
1438
+ line.textContent = message;
1439
+ output.appendChild(line);
1440
+ output.scrollTop = output.scrollHeight;
1441
+
1442
+ // Limit lines to prevent memory issues
1443
+ const lines = output.querySelectorAll('.terminal-line');
1444
+ if (lines.length > 300) {
1445
+ for (let i = 0; i < 100; i++) {
1446
+ if (lines[i]) lines[i].remove();
1447
+ }
1448
+ }
1449
+ }
1450
+
1451
+ updateStatus(text) {
1452
+ document.getElementById('terminalStatus').textContent = text;
1453
+ document.getElementById('configStatus').textContent = text;
1454
+ }
1455
+
1456
+ updateProgress(percent) {
1457
+ document.getElementById('progressFill').style.width = `${percent}%`;
1458
+ document.getElementById('progressPercent').textContent = `${Math.round(percent)}%`;
1459
+ }
1460
+
1461
+ executeCommand() {
1462
+ const input = document.getElementById('hfInput');
1463
+ const command = input.value.trim().toLowerCase();
1464
+
1465
+ if (!command) return;
1466
+
1467
+ this.printTerminal(`⟩⟩ ${command}`, "command");
1468
+
1469
+ switch(command) {
1470
+ case 'generate':
1471
+ case 'gen':
1472
+ this.generateDataset();
1473
+ break;
1474
+ case 'export':
1475
+ case 'zip':
1476
+ this.exportDataset();
1477
+ break;
1478
+ case 'clear':
1479
+ this.clearTerminal();
1480
+ break;
1481
+ case 'help':
1482
+ this.showHelp();
1483
+ break;
1484
+ case 'status':
1485
+ this.showStatus();
1486
+ break;
1487
+ case 'stop':
1488
+ this.stopGeneration();
1489
+ break;
1490
+ case 'schema':
1491
+ this.printTerminal("Using correct Hugging Face YAML schema with 'list' and 'sequence' types", "info");
1492
+ break;
1493
+ default:
1494
+ this.printTerminal(`Unknown command: ${command}`, "error");
1495
+ this.printTerminal("Type 'help' for available commands", "info");
1496
+ }
1497
+
1498
+ input.value = '';
1499
+ input.focus();
1500
+ }
1501
+
1502
+ showHelp() {
1503
+ const help = `
1504
+ Available Commands:
1505
+ -------------------
1506
+ generate / gen - Generate dataset with current configuration
1507
+ export / zip - Export dataset as ZIP (HF compatible)
1508
+ stop - Stop dataset generation
1509
+ status - Show generation status
1510
+ schema - Show schema information
1511
+ clear - Clear terminal
1512
+ help - Show this help message
1513
+ `.trim();
1514
+
1515
+ help.split('\n').forEach(line => {
1516
+ this.printTerminal(line, "output");
1517
+ });
1518
+ }
1519
+
1520
+ showStatus() {
1521
+ let status = `Generation Status: ${this.isGenerating ? 'RUNNING' : 'IDLE'}\n`;
1522
+ status += `TensorFlow Backend: ${this.stats.backend.toUpperCase()}\n`;
1523
+ status += `Samples Generated: ${this.dataset.train.length + this.dataset.test.length}\n`;
1524
+ status += `Train Samples: ${this.dataset.train.length}\n`;
1525
+ status += `Test Samples: ${this.dataset.test.length}\n`;
1526
+
1527
+ if (this.dataset.train.length > 0) {
1528
+ const config = this.getConfig();
1529
+ status += `\nCurrent Configuration:\n`;
1530
+ status += `- Name: ${config.name}\n`;
1531
+ status += `- Matrix Size: ${config.matrixSize}×${config.matrixSize}\n`;
1532
+ status += `- Format: ${config.format}\n`;
1533
+ status += `- Operations: ${config.operations.join(', ') || 'None'}\n`;
1534
+ status += `- Train Split: ${config.trainSplit}%\n`;
1535
+ }
1536
+
1537
+ this.printTerminal(status, "output");
1538
+ }
1539
+
1540
+ stopGeneration() {
1541
+ if (this.isGenerating) {
1542
+ this.isGenerating = false;
1543
+ this.printTerminal("Dataset generation stopped by user", "warning");
1544
+ this.updateStatus("STOPPED");
1545
+ } else {
1546
+ this.printTerminal("No generation in progress", "info");
1547
+ }
1548
+ }
1549
+
1550
+ clearTerminal() {
1551
+ document.getElementById('terminalOutput').innerHTML = `
1552
+ <div class="terminal-line hf">⟩⟩ Hugging Face Dataset Generator v2.2</div>
1553
+ <div class="terminal-line output">Fixed Hugging Face schema compatibility</div>
1554
+ <div class="terminal-line output">All exports validated for HF Hub upload</div>
1555
+ <div class="terminal-line output">Terminal cleared</div>
1556
+ `;
1557
+ }
1558
+ }
1559
+
1560
+ // ==================== OS FUNCTIONS ====================
1561
+ let hfGenerator = null;
1562
+
1563
+ function openHFWindow() {
1564
+ document.getElementById('hfWindow').classList.add('active');
1565
+ if (!hfGenerator) {
1566
+ hfGenerator = new HFDatasetGenerator();
1567
+ }
1568
+ }
1569
+
1570
+ function closeHFWindow() {
1571
+ document.getElementById('hfWindow').classList.remove('active');
1572
+ }
1573
+
1574
+ document.addEventListener('DOMContentLoaded', function() {
1575
+ // Boot sequence
1576
+ const loadingFill = document.getElementById('loadingFill');
1577
+ const loadingScreen = document.getElementById('loadingScreen');
1578
+ const taskbar = document.getElementById('taskbar');
1579
+
1580
+ let loadProgress = 0;
1581
+ const loadInterval = setInterval(() => {
1582
+ loadProgress += 2;
1583
+ loadingFill.style.width = loadProgress + '%';
1584
+
1585
+ if (loadProgress >= 100) {
1586
+ clearInterval(loadInterval);
1587
+ setTimeout(() => {
1588
+ loadingScreen.style.display = 'none';
1589
+ taskbar.style.display = 'flex';
1590
+ hfGenerator = new HFDatasetGenerator();
1591
+
1592
+ // Auto-open window after brief delay
1593
+ setTimeout(() => {
1594
+ openHFWindow();
1595
+ }, 300);
1596
+ }, 500);
1597
+ }
1598
+ }, 30);
1599
+
1600
+ // Update clock
1601
+ function updateClock() {
1602
+ const now = new Date();
1603
+ const time = now.toLocaleTimeString([], { hour: '2-digit', minute: '2-digit', second: '2-digit' });
1604
+ document.getElementById('clock').textContent = time;
1605
+ }
1606
+ setInterval(updateClock, 1000);
1607
+ updateClock();
1608
+
1609
+ // Keyboard shortcuts
1610
+ document.addEventListener('keydown', (e) => {
1611
+ // Ctrl+G to generate dataset
1612
+ if (e.ctrlKey && e.key === 'g') {
1613
+ e.preventDefault();
1614
+ if (hfGenerator) hfGenerator.generateDataset();
1615
+ }
1616
+
1617
+ // Ctrl+E to export
1618
+ if (e.ctrlKey && e.key === 'e') {
1619
+ e.preventDefault();
1620
+ if (hfGenerator) hfGenerator.exportDataset();
1621
+ }
1622
+
1623
+ // Escape to close window
1624
+ if (e.key === 'Escape') {
1625
+ closeHFWindow();
1626
+ }
1627
+
1628
+ // Focus input when typing in terminal
1629
+ if (e.key.length === 1 && !e.ctrlKey && !e.metaKey) {
1630
+ const input = document.getElementById('hfInput');
1631
+ if (document.getElementById('hfWindow').classList.contains('active')) {
1632
+ input.focus();
1633
+ }
1634
+ }
1635
+ });
1636
+
1637
+ // Terminal input
1638
+ const hfInput = document.getElementById('hfInput');
1639
+ hfInput.addEventListener('keypress', (e) => {
1640
+ if (e.key === 'Enter') {
1641
+ if (hfGenerator) hfGenerator.executeCommand();
1642
+ }
1643
+ });
1644
+
1645
+ // Initial configuration updates
1646
+ document.getElementById('sampleCount').dispatchEvent(new Event('input'));
1647
+ document.getElementById('matrixSize').dispatchEvent(new Event('input'));
1648
+ document.getElementById('trainSplit').dispatchEvent(new Event('input'));
1649
+ });
1650
+ </script>
1651
+ </body>
1652
+ </html>