177 lines
4.6 KiB
HTML
177 lines
4.6 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 {
|
|
font-family: Arial, sans-serif;
|
|
background-color: #0f0f0f;
|
|
color: #e0e0e0;
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
.container {
|
|
max-width: 1200px;
|
|
margin: auto;
|
|
padding: 20px;
|
|
}
|
|
.section {
|
|
background: #1a1a1a;
|
|
border-radius: 12px;
|
|
padding: 20px;
|
|
margin-bottom: 20px;
|
|
box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.5);
|
|
}
|
|
h1, h2 {
|
|
color: #ffd700;
|
|
margin-bottom: 12px;
|
|
}
|
|
p {
|
|
margin: 5px 0;
|
|
font-size: 16px;
|
|
}
|
|
ul {
|
|
list-style-type: none;
|
|
padding-left: 0;
|
|
}
|
|
li {
|
|
background: #262626;
|
|
margin: 4px 0;
|
|
padding: 8px;
|
|
border-radius: 8px;
|
|
font-size: 14px;
|
|
}
|
|
.nav {
|
|
background-color: #1e1e1e;
|
|
padding: 10px;
|
|
margin-bottom: 20px;
|
|
}
|
|
.nav a {
|
|
color: #e0e0e0;
|
|
margin-right: 20px;
|
|
text-decoration: none;
|
|
}
|
|
.preview-box {
|
|
background: #262626;
|
|
padding: 15px;
|
|
border-radius: 8px;
|
|
margin-top: 10px;
|
|
font-size: 14px;
|
|
max-height: 120px;
|
|
overflow-y: auto;
|
|
}
|
|
</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>
|
|
<a href="/health">❤️ Health</a>
|
|
</div>
|
|
|
|
<div class="container">
|
|
<h1 style="text-align: center;">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">
|
|
<h2>🧠 Brain Stats</h2>
|
|
<p><strong>Vocabulary Size:</strong> {{ vocab_size }}</p>
|
|
<p><strong>Memory Entries:</strong> {{ memory_size }}</p>
|
|
</div>
|
|
|
|
<div class="section">
|
|
<h2>📖 Current Book Progress</h2>
|
|
<p><strong>Currently Reading:</strong> {{ current_book }}</p>
|
|
<p><strong>Line:</strong> {{ current_line }}</p>
|
|
<div class="preview-box">
|
|
{{ current_passage }}
|
|
</div>
|
|
</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="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
|
|
},
|
|
y: {
|
|
title: {
|
|
display: true,
|
|
text: 'Loss Value'
|
|
},
|
|
beginAtZero: false
|
|
}
|
|
},
|
|
plugins: {
|
|
legend: {
|
|
display: false
|
|
}
|
|
}
|
|
}
|
|
});
|
|
</script>
|
|
</div>
|
|
</body>
|
|
</html>
|