150 lines
3.8 KiB
HTML
150 lines
3.8 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta http-equiv="refresh" content="30">
|
|
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
|
<title>Ruby's Dashboard</title>
|
|
<style>
|
|
body {
|
|
background-color: #121212;
|
|
color: #e0e0e0;
|
|
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
|
margin: 0;
|
|
padding: 20px;
|
|
}
|
|
h1, h2 {
|
|
color: #ffffff;
|
|
}
|
|
p, li {
|
|
color: #cccccc;
|
|
}
|
|
ul {
|
|
list-style-type: square;
|
|
}
|
|
.section {
|
|
margin-bottom: 30px;
|
|
}
|
|
.divider {
|
|
border-top: 1px solid #333;
|
|
margin: 20px 0;
|
|
}
|
|
.entry {
|
|
margin-bottom: 15px;
|
|
padding-bottom: 10px;
|
|
border-bottom: 1px solid #333;
|
|
}
|
|
.nav {
|
|
background-color: #1e1e1e;
|
|
padding: 10px;
|
|
margin-bottom: 20px;
|
|
}
|
|
.nav a {
|
|
color: #e0e0e0;
|
|
margin-right: 20px;
|
|
text-decoration: none;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="nav">
|
|
<a href="/">🏠 Home</a>
|
|
<a href="/journal">📓 Journal</a>
|
|
<a href="/concepts">🧠 Concepts</a>
|
|
<a href="/brainmap">🕸️ Brain Map</a>
|
|
<a href="/growth">📈 Growth</a>
|
|
<a href="/dreams">💬 Dreams</a>
|
|
</div>
|
|
|
|
<h1>Ruby is Running 🧠</h1>
|
|
|
|
<div class="section">
|
|
<h2>⏳ Next Cycle</h2>
|
|
<p><strong>Next:</strong> {{ next_action_label }}</p>
|
|
<p id="countdown">{{ next_cycle }} seconds</p>
|
|
</div>
|
|
|
|
<script>
|
|
function updateCountdown() {
|
|
var countdown = document.getElementById("countdown");
|
|
var seconds = parseInt(countdown.innerText.split(" ")[0]);
|
|
if (seconds > 0) {
|
|
seconds -= 1;
|
|
countdown.innerText = seconds + " seconds";
|
|
}
|
|
}
|
|
setInterval(updateCountdown, 1000);
|
|
</script>
|
|
|
|
<div class="section">
|
|
<p><strong>Vocabulary Size:</strong> {{ vocab_size }}</p>
|
|
<p><strong>Memory Entries:</strong> {{ memory_size }}</p>
|
|
</div>
|
|
|
|
<div class="divider"></div>
|
|
|
|
<div class="section">
|
|
<h2>🏆 Highest Scoring Dreams</h2>
|
|
<ul>
|
|
{% for dream in top_dreams %}
|
|
<li><strong>{{ dream.score }}</strong> | {{ dream.sentence }}</li>
|
|
{% endfor %}
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="divider"></div>
|
|
|
|
<div class="section">
|
|
<h2>📉 Recent Loss</h2>
|
|
<canvas id="lossChart" width="400" height="200"></canvas>
|
|
</div>
|
|
<script>
|
|
const ctxLoss = document.getElementById('lossChart').getContext('2d');
|
|
|
|
const lossData = {
|
|
labels: [
|
|
{% for entry in loss_data[-50:] %}
|
|
"{{ loop.index0 }}",
|
|
{% endfor %}
|
|
],
|
|
datasets: [{
|
|
label: 'Loss',
|
|
data: [
|
|
{% for entry in loss_data[-50:] %}
|
|
{{ entry }},
|
|
{% endfor %}
|
|
],
|
|
fill: false,
|
|
borderColor: 'rgb(255, 99, 132)',
|
|
tension: 0.2
|
|
}]
|
|
};
|
|
|
|
const lossChart = new Chart(ctxLoss, {
|
|
type: 'line',
|
|
data: lossData,
|
|
options: {
|
|
scales: {
|
|
x: {
|
|
display: false // hide x-axis ticks
|
|
},
|
|
y: {
|
|
title: {
|
|
display: true,
|
|
text: 'Loss Value'
|
|
},
|
|
beginAtZero: false
|
|
}
|
|
},
|
|
plugins: {
|
|
legend: {
|
|
display: false
|
|
}
|
|
}
|
|
}
|
|
});
|
|
</script>
|
|
|
|
</body>
|
|
</html>
|