diff --git a/.gitignore b/.gitignore
index 03d13f6..7d115c6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -173,4 +173,6 @@ cython_debug/
/data/books/wizard_of_oz.txt
/data/memory/context.json
/data/memory/dreams.json
-/data/memory/vocab.json
\ No newline at end of file
+/data/memory/vocab.json
+data/memory/vocab.json
+data/memory/brainmap.json
diff --git a/dashboard/dashboard.py b/dashboard/dashboard.py
index 6d73288..c233b87 100644
--- a/dashboard/dashboard.py
+++ b/dashboard/dashboard.py
@@ -1,9 +1,11 @@
from flask import Flask, render_template
+from model.brainmap import get_brainmap
from model.journal import read_journal_entries
from model.memory import load_dreams
from model.tokenizer import Tokenizer
from model.abstraction import cluster_vocab
from context.context import load_context
+import json
import os
import time
@@ -43,6 +45,25 @@ def index():
next_cycle=remaining)
+@app.route("/brainmap")
+def brainmap():
+ map_data = get_brainmap()
+
+ nodes = []
+ links = []
+
+ for word, connections in map_data.items():
+ nodes.append({"id": word})
+ for linked_word, weight in connections.items():
+ links.append({
+ "source": word,
+ "target": linked_word,
+ "value": weight
+ })
+
+ return render_template("brainmap.html", nodes=json.dumps(nodes), links=json.dumps(links))
+
+
@app.route("/journal")
def journal():
entries = read_journal_entries()
diff --git a/dashboard/templates/brainmap.html b/dashboard/templates/brainmap.html
new file mode 100644
index 0000000..0e201e1
--- /dev/null
+++ b/dashboard/templates/brainmap.html
@@ -0,0 +1,61 @@
+
+
+
+
+ Ruby's Brain Map
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dashboard/templates/concepts.html b/dashboard/templates/concepts.html
index 81154fc..419a9a4 100644
--- a/dashboard/templates/concepts.html
+++ b/dashboard/templates/concepts.html
@@ -23,9 +23,31 @@
list-style-type: square;
padding-left: 20px;
}
+ .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;
+ }
+
+
π§ Ruby's Concept Clusters
{% for cluster_id, words in clusters.items() %}
diff --git a/dashboard/templates/index.html b/dashboard/templates/index.html
index e78c99c..f35a875 100644
--- a/dashboard/templates/index.html
+++ b/dashboard/templates/index.html
@@ -30,6 +30,12 @@
+
Ruby is Running π§
diff --git a/dashboard/templates/journal.html b/dashboard/templates/journal.html
index ef6c8ac..edf9e53 100644
--- a/dashboard/templates/journal.html
+++ b/dashboard/templates/journal.html
@@ -9,6 +9,7 @@
color: #e0e0e0;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
padding: 20px;
+ margin: 0;
}
h1 {
color: #ffffff;
@@ -18,13 +19,32 @@
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;
+ }
-
π Ruby's Journal
- {% for entry in entries %}
-
{{ entry }}
- {% endfor %}
+
+
+
π Ruby's Journal
+
+{% for entry in entries %}
+
{{ entry }}
+{% endfor %}
+