Spaces:
Running
Running
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Neon Cortex - AI Training Dashboard</title> | |
<script src="https://cdn.tailwindcss.com"></script> | |
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700&family=Share+Tech+Mono&display=swap"> | |
<style> | |
:root { | |
--neon-cyan: #00f0ff; | |
--neon-magenta: #ff00f0; | |
--neon-amber: #ffb000; | |
--neon-lime: #a0ff00; | |
--dark-bg: #0a0a12; | |
--panel-bg: #12121a; | |
} | |
body { | |
font-family: 'Share Tech Mono', monospace; | |
background-color: var(--dark-bg); | |
color: white; | |
overflow-x: hidden; | |
} | |
.lcars-panel { | |
background-color: var(--panel-bg); | |
border-radius: 8px 8px 0 0; | |
border-left: 4px solid var(--neon-cyan); | |
position: relative; | |
overflow: hidden; | |
} | |
.lcars-panel::before { | |
content: ''; | |
position: absolute; | |
top: 0; | |
left: 0; | |
right: 0; | |
height: 4px; | |
background: linear-gradient(90deg, var(--neon-cyan), var(--neon-magenta)); | |
} | |
.lcars-title { | |
font-family: 'Orbitron', sans-serif; | |
font-weight: 700; | |
color: var(--neon-cyan); | |
text-shadow: 0 0 8px rgba(0, 240, 255, 0.6); | |
} | |
.status-light { | |
width: 12px; | |
height: 12px; | |
border-radius: 50%; | |
display: inline-block; | |
margin-right: 8px; | |
box-shadow: 0 0 8px currentColor; | |
} | |
.pulse { | |
animation: pulse 2s infinite; | |
} | |
@keyframes pulse { | |
0% { opacity: 0.6; } | |
50% { opacity: 1; } | |
100% { opacity: 0.6; } | |
} | |
.progress-bar { | |
height: 8px; | |
background: rgba(255, 255, 255, 0.1); | |
border-radius: 4px; | |
overflow: hidden; | |
} | |
.progress-fill { | |
height: 100%; | |
background: linear-gradient(90deg, var(--neon-magenta), var(--neon-cyan)); | |
transition: width 0.5s ease; | |
} | |
.log-entry { | |
border-left: 2px solid var(--neon-amber); | |
padding-left: 8px; | |
margin-bottom: 4px; | |
font-size: 0.85rem; | |
} | |
.log-warning { | |
color: var(--neon-amber); | |
border-left-color: var(--neon-amber); | |
} | |
.log-error { | |
color: var(--neon-magenta); | |
border-left-color: var(--neon-magenta); | |
} | |
.log-success { | |
color: var(--neon-lime); | |
border-left-color: var(--neon-lime); | |
} | |
.grid-overlay { | |
position: absolute; | |
top: 0; | |
left: 0; | |
right: 0; | |
bottom: 0; | |
background: | |
linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px), | |
linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px); | |
background-size: 20px 20px; | |
pointer-events: none; | |
} | |
.glow-effect { | |
box-shadow: 0 0 15px rgba(0, 240, 255, 0.5); | |
} | |
.control-btn { | |
border: 1px solid var(--neon-cyan); | |
color: var(--neon-cyan); | |
background: rgba(0, 240, 255, 0.1); | |
transition: all 0.3s ease; | |
} | |
.control-btn:hover { | |
background: rgba(0, 240, 255, 0.3); | |
box-shadow: 0 0 10px rgba(0, 240, 255, 0.5); | |
} | |
.control-btn:active { | |
background: rgba(0, 240, 255, 0.5); | |
} | |
.data-sample { | |
border: 1px solid rgba(255, 255, 255, 0.1); | |
transition: all 0.3s ease; | |
} | |
.data-sample:hover { | |
border-color: var(--neon-lime); | |
box-shadow: 0 0 10px rgba(160, 255, 0, 0.3); | |
} | |
.chart-container { | |
position: relative; | |
height: 200px; | |
} | |
.chart-line { | |
fill: none; | |
stroke: var(--neon-cyan); | |
stroke-width: 2; | |
} | |
.chart-area { | |
fill: rgba(0, 240, 255, 0.1); | |
} | |
.heatmap-cell { | |
transition: all 0.3s ease; | |
} | |
.heatmap-cell:hover { | |
stroke: white; | |
stroke-width: 1px; | |
} | |
.ai-core { | |
position: relative; | |
width: 120px; | |
height: 120px; | |
border-radius: 50%; | |
background: radial-gradient(circle, rgba(0,240,255,0.1) 0%, rgba(0,240,255,0) 70%); | |
display: flex; | |
align-items: center; | |
justify-content: center; | |
} | |
.ai-core-inner { | |
width: 80px; | |
height: 80px; | |
border-radius: 50%; | |
background: radial-gradient(circle, rgba(0,240,255,0.2) 0%, rgba(0,240,255,0) 70%); | |
animation: rotate 20s linear infinite; | |
} | |
@keyframes rotate { | |
0% { transform: rotate(0deg); } | |
100% { transform: rotate(360deg); } | |
} | |
.ai-core-pulse { | |
position: absolute; | |
width: 100%; | |
height: 100%; | |
border-radius: 50%; | |
background: radial-gradient(circle, rgba(0,240,255,0.4) 0%, rgba(0,240,255,0) 70%); | |
animation: pulse-core 3s infinite; | |
} | |
@keyframes pulse-core { | |
0% { transform: scale(0.8); opacity: 0; } | |
50% { transform: scale(1); opacity: 0.6; } | |
100% { transform: scale(1.2); opacity: 0; } | |
} | |
</style> | |
</head> | |
<body class="min-h-screen p-4"> | |
<div class="grid-overlay fixed inset-0 z-0"></div> | |
<div class="container mx-auto relative z-10"> | |
<!-- Header --> | |
<header class="flex justify-between items-center mb-6"> | |
<div> | |
<h1 class="lcars-title text-3xl md:text-4xl">NEON CORTEX</h1> | |
<p class="text-gray-400">AI Training Core v2.3.7</p> | |
</div> | |
<div class="flex items-center"> | |
<span class="status-light bg-green-500 pulse"></span> | |
<span>ONLINE</span> | |
</div> | |
</header> | |
<div class="grid grid-cols-1 lg:grid-cols-3 gap-4 mb-4"> | |
<!-- System Status Panel --> | |
<div class="lcars-panel p-4 lg:col-span-1"> | |
<h2 class="text-xl font-bold mb-4 text-cyan-400">SYSTEM STATUS</h2> | |
<div class="mb-4"> | |
<div class="flex justify-between mb-1"> | |
<span>Model: <span class="text-amber-400">Nova-7B</span></span> | |
<span class="text-lime-400">v2.3.7</span> | |
</div> | |
<div class="progress-bar"> | |
<div class="progress-fill" style="width: 68%" id="model-progress"></div> | |
</div> | |
<div class="flex justify-between text-xs mt-1"> | |
<span>68% complete</span> | |
<span>ETA: 2h 17m</span> | |
</div> | |
</div> | |
<div class="space-y-3"> | |
<div> | |
<div class="flex items-center"> | |
<span class="status-light bg-cyan-500"></span> | |
<span>Dataset Processing</span> | |
</div> | |
<div class="ml-6 text-sm text-gray-300">Tokenizing sequences (batch 42/68)</div> | |
</div> | |
<div> | |
<div class="flex items-center"> | |
<span class="status-light bg-amber-500"></span> | |
<span>Training Phase</span> | |
</div> | |
<div class="ml-6 text-sm text-gray-300">RLHF - Reward Model Optimization</div> | |
</div> | |
<div> | |
<div class="flex items-center"> | |
<span class="status-light bg-magenta-500"></span> | |
<span>GPU Utilization</span> | |
</div> | |
<div class="ml-6 text-sm text-gray-300">4x A100 @ 87% load</div> | |
</div> | |
<div> | |
<div class="flex items-center"> | |
<span class="status-light bg-lime-500"></span> | |
<span>Memory</span> | |
</div> | |
<div class="ml-6 text-sm text-gray-300">42GB/64GB allocated</div> | |
</div> | |
</div> | |
<!-- AI Core Visualization --> | |
<div class="mt-6 flex justify-center"> | |
<div class="ai-core"> | |
<div class="ai-core-pulse"></div> | |
<div class="ai-core-inner"></div> | |
<div class="absolute text-center"> | |
<div class="text-xs">CORE</div> | |
<div class="text-xl font-bold">87%</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
<!-- Training Visualizations --> | |
<div class="lcars-panel p-4 lg:col-span-2"> | |
<h2 class="text-xl font-bold mb-4 text-magenta-400">TRAINING METRICS</h2> | |
<div class="grid grid-cols-1 md:grid-cols-2 gap-4"> | |
<!-- Loss Curve --> | |
<div> | |
<h3 class="text-sm font-bold mb-2 text-amber-400">LOSS CURVE</h3> | |
<div class="chart-container"> | |
<svg id="loss-chart" width="100%" height="100%"></svg> | |
</div> | |
</div> | |
<!-- Reward Heatmap --> | |
<div> | |
<h3 class="text-sm font-bold mb-2 text-lime-400">REWARD HEATMAP</h3> | |
<div class="chart-container"> | |
<svg id="heatmap-chart" width="100%" height="100%"></svg> | |
</div> | |
</div> | |
<!-- Token Frequency --> | |
<div> | |
<h3 class="text-sm font-bold mb-2 text-cyan-400">TOKEN FREQUENCY</h3> | |
<div class="chart-container"> | |
<svg id="token-chart" width="100%" height="100%"></svg> | |
</div> | |
</div> | |
<!-- Live Generation --> | |
<div> | |
<h3 class="text-sm font-bold mb-2 text-magenta-400">LIVE GENERATION</h3> | |
<div class="bg-black bg-opacity-30 p-3 rounded h-full"> | |
<div class="text-xs font-mono whitespace-pre-wrap" id="live-generation"> | |
[Generating sample output...] | |
<span class="text-amber-400">▋</span> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="grid grid-cols-1 lg:grid-cols-3 gap-4 mb-4"> | |
<!-- Live Logs --> | |
<div class="lcars-panel p-4 lg:col-span-2"> | |
<h2 class="text-xl font-bold mb-4 text-amber-400">TRAINING LOG</h2> | |
<div class="h-64 overflow-y-auto font-mono text-sm space-y-1" id="log-container"> | |
<!-- Log entries will be added here by JavaScript --> | |
</div> | |
</div> | |
<!-- Model Controls --> | |
<div class="lcars-panel p-4"> | |
<h2 class="text-xl font-bold mb-4 text-lime-400">MODEL CONTROLS</h2> | |
<div class="space-y-4"> | |
<div class="flex space-x-2"> | |
<button class="control-btn px-4 py-2 rounded flex-1" id="start-btn"> | |
<span class="status-light bg-green-500"></span> START | |
</button> | |
<button class="control-btn px-4 py-2 rounded flex-1" id="pause-btn"> | |
<span class="status-light bg-amber-500"></span> PAUSE | |
</button> | |
</div> | |
<div> | |
<label class="block text-sm mb-1">Learning Rate</label> | |
<input type="range" min="0.0001" max="0.01" step="0.0001" value="0.001" | |
class="w-full accent-cyan-500" id="lr-slider"> | |
<div class="text-right text-xs" id="lr-value">0.001</div> | |
</div> | |
<div> | |
<label class="block text-sm mb-1">Batch Size</label> | |
<select class="w-full bg-gray-900 border border-gray-700 rounded px-3 py-2 text-sm focus:outline-none focus:ring-1 focus:ring-cyan-500"> | |
<option>32</option> | |
<option selected>64</option> | |
<option>128</option> | |
<option>256</option> | |
</select> | |
</div> | |
<div class="pt-2"> | |
<button class="control-btn w-full py-2 rounded"> | |
<span class="status-light bg-magenta-500"></span> SAVE CHECKPOINT | |
</button> | |
</div> | |
<div class="border-t border-gray-700 pt-3"> | |
<h3 class="text-sm font-bold mb-2">SYSTEM ACTIONS</h3> | |
<div class="flex space-x-2"> | |
<button class="control-btn px-3 py-1 rounded text-xs flex-1"> | |
DEBUG MODE | |
</button> | |
<button class="control-btn px-3 py-1 rounded text-xs flex-1"> | |
EXPORT LOGS | |
</button> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
<!-- Dataset Viewer --> | |
<div class="lcars-panel p-4 mb-4"> | |
<h2 class="text-xl font-bold mb-4 text-magenta-400">DATASET VIEWER</h2> | |
<div class="grid grid-cols-2 md:grid-cols-4 lg:grid-cols-6 gap-4"> | |
<!-- Dataset samples --> | |
<div class="data-sample p-2 rounded cursor-pointer" data-sample-id="1"> | |
<div class="bg-gray-800 h-24 mb-1 flex items-center justify-center text-xs"> | |
<span class="text-center">[TEXT PROMPT]</span> | |
</div> | |
<div class="text-xs truncate">"Design a futuristic UI for..."</div> | |
<div class="text-xxs text-gray-400">Batch 42 • 14:23:07</div> | |
</div> | |
<div class="data-sample p-2 rounded cursor-pointer" data-sample-id="2"> | |
<div class="bg-gray-800 h-24 mb-1 flex items-center justify-center text-xs"> | |
<span class="text-center">[PARAMETRIC SEQ]</span> | |
</div> | |
<div class="text-xs truncate">[0.42, 1.73, -0.15, ...]</div> | |
<div class="text-xxs text-gray-400">Batch 43 • 14:23:09</div> | |
</div> | |
<div class="data-sample p-2 rounded cursor-pointer" data-sample-id="3"> | |
<div class="bg-gray-800 h-24 mb-1 flex items-center justify-center text-xs"> | |
<span class="text-center">[SKETCH]</span> | |
</div> | |
<div class="text-xs truncate">Concept sketch #2871</div> | |
<div class="text-xxs text-gray-400">Batch 41 • 14:22:55</div> | |
</div> | |
<div class="data-sample p-2 rounded cursor-pointer" data-sample-id="4"> | |
<div class="bg-gray-800 h-24 mb-1 flex items-center justify-center text-xs"> | |
<span class="text-center">[CODE]</span> | |
</div> | |
<div class="text-xs truncate">function generateUI() {...}</div> | |
<div class="text-xxs text-gray-400">Batch 44 • 14:23:12</div> | |
</div> | |
<div class="data-sample p-2 rounded cursor-pointer" data-sample-id="5"> | |
<div class="bg-gray-800 h-24 mb-1 flex items-center justify-center text-xs"> | |
<span class="text-center">[3D MODEL]</span> | |
</div> | |
<div class="text-xs truncate">Component_A.stl</div> | |
<div class="text-xxs text-gray-400">Batch 40 • 14:22:48</div> | |
</div> | |
<div class="data-sample p-2 rounded cursor-pointer" data-sample-id="6"> | |
<div class="bg-gray-800 h-24 mb-1 flex items-center justify-center text-xs"> | |
<span class="text-center">[AUDIO]</span> | |
</div> | |
<div class="text-xs truncate">Voice command sample</div> | |
<div class="text-xxs text-gray-400">Batch 45 • 14:23:15</div> | |
</div> | |
</div> | |
<!-- Sample Detail View (hidden by default) --> | |
<div class="mt-4 hidden" id="sample-detail"> | |
<div class="bg-black bg-opacity-30 p-4 rounded"> | |
<div class="flex justify-between items-start mb-2"> | |
<div> | |
<h3 class="font-bold" id="sample-title">Sample Title</h3> | |
<div class="text-xs text-gray-400" id="sample-meta">Batch 42 • 14:23:07 • Source: Dataset v3.2</div> | |
</div> | |
<button class="text-gray-400 hover:text-white" id="close-detail">×</button> | |
</div> | |
<div class="grid grid-cols-1 md:grid-cols-3 gap-4"> | |
<div class="md:col-span-2"> | |
<div class="bg-black p-3 rounded h-48 overflow-auto" id="sample-content"> | |
Sample content will appear here | |
</div> | |
</div> | |
<div> | |
<h4 class="text-sm font-bold mb-2">MODEL INTERPRETATION</h4> | |
<div class="bg-black bg-opacity-30 p-3 rounded h-48 overflow-auto text-xs" id="sample-interpretation"> | |
Model's interpretation of this sample will appear here | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
<script> | |
// Generate sample log entries | |
const logContainer = document.getElementById('log-container'); | |
const logEntries = [ | |
{msg: "Initializing Neon Cortex v2.3.7 training session", type: "info"}, | |
{msg: "Loading dataset from /datastore/nova-7b/v3.2", type: "info"}, | |
{msg: "Dataset contains 1,240,382 samples", type: "info"}, | |
{msg: "WARNING: 12 samples failed validation checks", type: "warning"}, | |
{msg: "Tokenizing input sequences...", type: "info"}, | |
{msg: "Tokenized batch 1/68 (18,432 sequences)", type: "info"}, | |
{msg: "Initializing RLHF reward model", type: "info"}, | |
{msg: "ERROR: GPU 3 temperature threshold exceeded (82°C)", type: "error"}, | |
{msg: "Cooling system engaged, temperature stabilized", type: "info"}, | |
{msg: "Training epoch 1 started", type: "info"}, | |
{msg: "Loss: 3.421 → 2.873 (improvement: 16%)", type: "success"}, | |
{msg: "Checkpoint saved to /checkpoints/nova-7b/epoch1", type: "info"}, | |
{msg: "Tokenized batch 42/68 (17,856 sequences)", type: "info"}, | |
{msg: "Reward model updated with 4,296 new preference pairs", type: "info"}, | |
{msg: "WARNING: Batch 43 contains irregular token distribution", type: "warning"}, | |
{msg: "Compensating with dynamic attention scaling", type: "info"}, | |
{msg: "Loss: 1.873 → 1.642 (improvement: 12.3%)", type: "success"}, | |
]; | |
function addLogEntry(entry) { | |
const logElement = document.createElement('div'); | |
logElement.className = `log-entry log-${entry.type}`; | |
logElement.textContent = `[${new Date().toLocaleTimeString()}] ${entry.msg}`; | |
logContainer.appendChild(logElement); | |
logContainer.scrollTop = logContainer.scrollHeight; | |
} | |
// Add initial logs | |
logEntries.forEach((entry, index) => { | |
setTimeout(() => addLogEntry(entry), index * 800); | |
}); | |
// Continue adding logs periodically | |
setInterval(() => { | |
const sampleLogs = [ | |
{msg: "Processing batch " + (Math.floor(Math.random() * 68) + 1) + "/68", type: "info"}, | |
{msg: "Loss: " + (Math.random() * 2 + 1).toFixed(3), type: "info"}, | |
{msg: "Reward score: " + (Math.random() * 10).toFixed(2), type: "info"}, | |
{msg: "Memory usage: " + (Math.random() * 20 + 40).toFixed(0) + "GB", type: "info"}, | |
{msg: "Token frequency distribution updated", type: "info"}, | |
{msg: "WARNING: Slight gradient spike detected", type: "warning"}, | |
{msg: "Loss improved by " + (Math.random() * 15 + 5).toFixed(1) + "%", type: "success"}, | |
]; | |
addLogEntry(sampleLogs[Math.floor(Math.random() * sampleLogs.length)]); | |
}, 3000); | |
// Update progress bar | |
let progress = 68; | |
const progressBar = document.getElementById('model-progress'); | |
setInterval(() => { | |
if (progress < 100) { | |
progress += Math.random() * 0.5; | |
progressBar.style.width = `${progress}%`; | |
document.querySelector('#system-status span:last-child').textContent = `${Math.floor(progress)}% complete`; | |
// Update ETA | |
const remaining = 100 - progress; | |
const hours = Math.floor(remaining / 30); | |
const minutes = Math.floor((remaining % 30) * 2); | |
document.querySelector('#system-status span:last-child').nextElementSibling.textContent = `ETA: ${hours}h ${minutes}m`; | |
} | |
}, 5000); | |
// Sample viewer interaction | |
const samples = document.querySelectorAll('.data-sample'); | |
const sampleDetail = document.getElementById('sample-detail'); | |
const sampleTitle = document.getElementById('sample-title'); | |
const sampleMeta = document.getElementById('sample-meta'); | |
const sampleContent = document.getElementById('sample-content'); | |
const sampleInterpretation = document.getElementById('sample-interpretation'); | |
const closeDetail = document.getElementById('close-detail'); | |
const sampleData = { | |
1: { | |
title: "Text Prompt Sample", | |
meta: "Batch 42 • 14:23:07 • Source: Dataset v3.2", | |
content: `"Design a futuristic UI for an AI training system with LCARS-inspired elements and cyberpunk aesthetics. The interface should include:\n\n- Real-time training metrics\n- System status indicators\n- Dataset visualization\n- Model control panel\n\nFocus on creating an immersive experience that makes the user feel like they're monitoring a high-tech AI core."`, | |
interpretation: "This text prompt is designed to generate UI concepts for AI training systems. The model has associated this with:\n\n- 87% match to interface design tasks\n- 72% match to sci-fi aesthetic generation\n- 63% match to technical dashboard creation\n\nRecommended augmentation: Add parametric constraints for color scheme and layout requirements." | |
}, | |
2: { | |
title: "Parametric Sequence", | |
meta: "Batch 43 • 14:23:09 • Source: RLHF Dataset v2.1", | |
content: `[0.42, 1.73, -0.15, 0.89, -1.22, 0.56, 1.98, -0.67, 0.31, -1.05, 0.77, 1.12, -0.89, 0.23, 1.45, -0.32, 0.91, 1.67, -0.78, 0.12]`, | |
interpretation: "This parametric sequence represents:\n\n- Reward model weights for the current RLHF phase\n- Dimension 1 (0.42): Importance of factual accuracy\n- Dimension 2 (1.73): Creativity multiplier\n- Dimension 3 (-0.15): Safety constraint\n\nSequence is within normal parameters but shows slightly elevated creativity weighting which may require monitoring." | |
}, | |
3: { | |
title: "Concept Sketch", | |
meta: "Batch 41 • 14:22:55 • Source: Design Corpus v4.3", | |
content: "SKETCH DATA: [vector points...]\n\nRough concept sketch of a circular AI core visualization with pulsating rings and status indicators. Shows radial layout with:\n- Central core display\n- Surrounding metric panels\n- Glowing connection lines\n- Color-coded alert system", | |
interpretation: "Sketch matches 92% with successful UI designs from previous iterations. Key features detected:\n\n- Central focal point (optimal for attention)\n- Clear information hierarchy\n- Effective use of color coding\n\nRecommendation: Implement this layout for the system status overview panel with dynamic pulsing animation." | |
} | |
}; | |
samples.forEach(sample => { | |
sample.addEventListener('click', () => { | |
const sampleId = sample.getAttribute('data-sample-id'); | |
if (sampleData[sampleId]) { | |
sampleTitle.textContent = sampleData[sampleId].title; | |
sampleMeta.textContent = sampleData[sampleId].meta; | |
sampleContent.textContent = sampleData[sampleId].content; | |
sampleInterpretation.textContent = sampleData[sampleId].interpretation; | |
sampleDetail.classList.remove('hidden'); | |
} | |
}); | |
}); | |
closeDetail.addEventListener('click', () => { | |
sampleDetail.classList.add('hidden'); | |
}); | |
// Control buttons | |
const startBtn = document.getElementById('start-btn'); | |
const pauseBtn = document.getElementById('pause-btn'); | |
startBtn.addEventListener('click', () => { | |
addLogEntry({msg: "Training resumed", type: "success"}); | |
startBtn.querySelector('.status-light').classList.add('bg-green-500'); | |
startBtn.querySelector('.status-light').classList.remove('bg-gray-500'); | |
pauseBtn.querySelector('.status-light').classList.add('bg-amber-500'); | |
pauseBtn.querySelector('.status-light').classList.remove('bg-gray-500'); | |
}); | |
pauseBtn.addEventListener('click', () => { | |
addLogEntry({msg: "Training paused", type: "warning"}); | |
startBtn.querySelector('.status-light').classList.remove('bg-green-500'); | |
startBtn.querySelector('.status-light').classList.add('bg-gray-500'); | |
pauseBtn.querySelector('.status-light').classList.remove('bg-amber-500'); | |
pauseBtn.querySelector('.status-light').classList.add('bg-gray-500'); | |
}); | |
// Learning rate slider | |
const lrSlider = document.getElementById('lr-slider'); | |
const lrValue = document.getElementById('lr-value'); | |
lrSlider.addEventListener('input', () => { | |
lrValue.textContent = lrSlider.value; | |
}); | |
// Generate charts | |
function generateLossChart() { | |
const svg = document.getElementById('loss-chart'); | |
svg.innerHTML = ''; | |
const width = svg.clientWidth; | |
const height = svg.clientHeight; | |
const padding = 20; | |
// Create axes | |
const xAxis = document.createElementNS('http://www.w3.org/2000/svg', 'line'); | |
xAxis.setAttribute('x1', padding); | |
xAxis.setAttribute('y1', height - padding); | |
xAxis.setAttribute('x2', width - padding); | |
xAxis.setAttribute('y2', height - padding); | |
xAxis.setAttribute('stroke', 'rgba(255,255,255,0.3)'); | |
xAxis.setAttribute('stroke-width', '1'); | |
svg.appendChild(xAxis); | |
const yAxis = document.createElementNS('http://www.w3.org/2000/svg', 'line'); | |
yAxis.setAttribute('x1', padding); | |
yAxis.setAttribute('y1', padding); | |
yAxis.setAttribute('x2', padding); | |
yAxis.setAttribute('y2', height - padding); | |
yAxis.setAttribute('stroke', 'rgba(255,255,255,0.3)'); | |
yAxis.setAttribute('stroke-width', '1'); | |
svg.appendChild(yAxis); | |
// Generate loss curve data | |
const points = []; | |
for (let i = 0; i < 20; i++) { | |
points.push({ | |
x: padding + (i * (width - padding * 2) / 20), | |
y: height - padding - (Math.random() * 0.7 + 0.3) * (height - padding * 2) | |
}); | |
} | |
// Create area | |
let areaPath = `M${padding},${height - padding} `; | |
points.forEach(point => { | |
areaPath += `L${point.x},${point.y} `; | |
}); | |
areaPath += `L${width - padding},${height - padding} Z`; | |
const area = document.createElementNS('http://www.w3.org/2000/svg', 'path'); | |
area.setAttribute('d', areaPath); | |
area.setAttribute('fill', 'rgba(0, 240, 255, 0.1)'); | |
svg.appendChild(area); | |
// Create line | |
let linePath = `M${points[0].x},${points[0].y} `; | |
points.slice(1).forEach(point => { | |
linePath += `L${point.x},${point.y} `; | |
}); | |
const line = document.createElementNS('http://www.w3.org/2000/svg', 'path'); | |
line.setAttribute('d', linePath); | |
line.setAttribute('fill', 'none'); | |
line.setAttribute('stroke', '#00f0ff'); | |
line.setAttribute('stroke-width', '2'); | |
svg.appendChild(line); | |
// Add labels | |
const xLabel = document.createElementNS('http://www.w3.org/2000/svg', 'text'); | |
xLabel.setAttribute('x', width - padding - 30); | |
xLabel.setAttribute('y', height - padding + 15); | |
xLabel.setAttribute('fill', 'rgba(255,255,255,0.6)'); | |
xLabel.setAttribute('font-size', '10'); | |
xLabel.textContent = 'Epochs'; | |
svg.appendChild(xLabel); | |
const yLabel = document.createElementNS('http://www.w3.org/2000/svg', 'text'); | |
yLabel.setAttribute('x', padding + 5); | |
yLabel.setAttribute('y', padding + 10); | |
yLabel.setAttribute('fill', 'rgba(255,255,255,0.6)'); | |
yLabel.setAttribute('font-size', '10'); | |
yLabel.textContent = 'Loss'; | |
svg.appendChild(yLabel); | |
} | |
function generateHeatmap() { | |
const svg = document.getElementById('heatmap-chart'); | |
svg.innerHTML = ''; | |
const width = svg.clientWidth; | |
const height = svg.clientHeight; | |
const padding = 20; | |
const cellSize = 20; | |
const cols = Math.floor((width - padding * 2) / cellSize); | |
const rows = Math.floor((height - padding * 2) / cellSize); | |
for (let x = 0; x < cols; x++) { | |
for (let y = 0; y < rows; y++) { | |
const value = Math.random(); | |
const color = value > 0.8 ? '#ff00f0' : | |
value > 0.6 ? '#ff00a0' : | |
value > 0.4 ? '#ff0060' : | |
value > 0.2 ? '#ff0020' : '#ff0000'; | |
const rect = document.createElementNS('http://www.w3.org/2000/svg', 'rect'); | |
rect.setAttribute('x', padding + x * cellSize); | |
rect.setAttribute('y', padding + y * cellSize); | |
rect.setAttribute('width', cellSize - 2); | |
rect.setAttribute('height', cellSize - 2); | |
rect.setAttribute('fill', color); | |
rect.setAttribute('class', 'heatmap-cell'); | |
svg.appendChild(rect); | |
} | |
} | |
// Add labels | |
const xLabel = document.createElementNS('http://www.w3.org/2000/svg', 'text'); | |
xLabel.setAttribute('x', width - padding - 30); | |
xLabel.setAttribute('y', height - padding + 15); | |
xLabel.setAttribute('fill', 'rgba(255,255,255,0.6)'); | |
xLabel.setAttribute('font-size', '10'); | |
xLabel.textContent = 'Reward Dim'; | |
svg.appendChild(xLabel); | |
const yLabel = document.createElementNS('http://www.w3.org/2000/svg', 'text'); | |
yLabel.setAttribute('x', padding + 5); | |
yLabel.setAttribute('y', padding + 10); | |
yLabel.setAttribute('fill', 'rgba(255,255,255,0.6)'); | |
yLabel.setAttribute('font-size', '10'); | |
yLabel.textContent = 'Samples'; | |
svg.appendChild(yLabel); | |
} | |
function generateTokenChart() { | |
const svg = document.getElementById('token-chart'); | |
svg.innerHTML = ''; | |
const width = svg.clientWidth; | |
const height = svg.clientHeight; | |
const padding = 20; | |
const barCount = 10; | |
const barWidth = (width - padding * 2) / barCount - 5; | |
const tokens = [ | |
{token: "Design", freq: 0.42}, | |
{token: "System", freq: 0.38}, | |
{token: "Model", freq: 0.35}, | |
{token: "Neural", freq: 0.31}, | |
{token: "Core", freq: 0.28}, | |
{token: "Training", freq: 0.25}, | |
{token: "Network", freq: 0.22}, | |
{token: "Learning", freq: 0.19}, | |
{token: "Deep", freq: 0.16}, | |
{token: "AI", freq: 0.12} | |
]; | |
// Create axes | |
const xAxis = document.createElementNS('http://www.w3.org/2000/svg', 'line'); | |
xAxis.setAttribute('x1', padding); | |
xAxis.setAttribute('y1', height - padding); | |
xAxis.setAttribute('x2', width - padding); | |
xAxis.setAttribute('y2', height - padding); | |
xAxis.setAttribute('stroke', 'rgba(255,255,255,0.3)'); | |
xAxis.setAttribute('stroke-width', '1'); | |
svg.appendChild(xAxis); | |
const yAxis = document.createElementNS('http://www.w3.org/2000/svg', 'line'); | |
yAxis.setAttribute('x1', padding); | |
yAxis.setAttribute('y1', padding); | |
yAxis.setAttribute('x2', padding); | |
yAxis.setAttribute('y2', height - padding); | |
yAxis.setAttribute('stroke', 'rgba(255,255,255,0.3)'); | |
yAxis.setAttribute('stroke-width', '1'); | |
svg.appendChild(yAxis); | |
// Create bars | |
tokens.forEach((token, i) => { | |
const barHeight = token.freq * (height - padding * 2); | |
const x = padding + i * (barWidth + 5); | |
const y = height - padding - barHeight; | |
const rect = document.createElementNS('http://www.w3.org/2000/svg', 'rect'); | |
rect.setAttribute('x', x); | |
rect.setAttribute('y', y); | |
rect.setAttribute('width', barWidth); | |
rect.setAttribute('height', barHeight); | |
rect.setAttribute('fill', '#a0ff00'); | |
svg.appendChild(rect); | |
const text = document.createElementNS('http://www.w3.org/2000/svg', 'text'); | |
text.setAttribute('x', x + barWidth / 2); | |
text.setAttribute('y', height - padding + 15); | |
text.setAttribute('text-anchor', 'middle'); | |
text.setAttribute('fill', 'rgba(255,255,255,0.6)'); | |
text.setAttribute('font-size', '10'); | |
text.textContent = token.token; | |
svg.appendChild(text); | |
}); | |
// Add labels | |
const yLabel = document.createElementNS('http://www.w3.org/2000/svg', 'text'); | |
yLabel.setAttribute('x', padding + 5); | |
yLabel.setAttribute('y', padding + 10); | |
yLabel.setAttribute('fill', 'rgba(255,255,255,0.6)'); | |
yLabel.setAttribute('font-size', '10'); | |
yLabel.textContent = 'Frequency'; | |
svg.appendChild(yLabel); | |
} | |
// Generate live generation text | |
const liveGeneration = document.getElementById('live-generation'); | |
const generationSamples = [ | |
"Generating parametric design for orbital habitat module...", | |
"Analyzing structural integrity of generated components...", | |
"Optimizing material distribution for weight constraints...", | |
"Simulating stress points in microgravity environment...", | |
"Rendering 3D visualization of assembly sequence...", | |
"Calculating thermal properties of composite materials...", | |
"Generating assembly instructions for robotic construction...", | |
"Validating safety protocols against regulatory standards..." | |
]; | |
setInterval(() => { | |
const sample = generationSamples[Math.floor(Math.random() * generationSamples.length)]; | |
liveGeneration.textContent = sample + "\n"; | |
// Add blinking cursor | |
const cursor = document.createElement('span'); | |
cursor.className = 'text-amber-400'; | |
cursor.textContent = '▋'; | |
liveGeneration.appendChild(cursor); | |
// Randomly add progress indicator | |
if (Math.random() > 0.7) { | |
setTimeout(() => { | |
liveGeneration.textContent += "\n[Progress: " + (Math.random() * 40 + 10).toFixed(0) + "%]"; | |
}, 500); | |
} | |
}, 4000); | |
// Initialize charts | |
generateLossChart(); | |
generateHeatmap(); | |
generateTokenChart(); | |
// Make charts responsive | |
window.addEventListener('resize', () => { | |
generateLossChart(); | |
generateHeatmap(); | |
generateTokenChart(); | |
}); | |
</script> | |
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=nomadicsynth/training-hub" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body> | |
</html> |