diff --git a/dashboard/dashboard.py b/dashboard/dashboard.py index 93a7a46..c8749b4 100644 --- a/dashboard/dashboard.py +++ b/dashboard/dashboard.py @@ -1,13 +1,20 @@ from flask import Flask, render_template +from model.memory import load_dreams +from model.tokenizer import Tokenizer import threading app = Flask(__name__) +tokenizer = Tokenizer() @app.route("/") def index(): - return render_template("index.html") + dreams = load_dreams() + top_dreams = dreams[:5] + return render_template("index.html", + vocab_size=len(tokenizer.vocab), + top_dreams=top_dreams) def run_dashboard(): diff --git a/dashboard/templates/index.html b/dashboard/templates/index.html index 34e30a3..819776f 100644 --- a/dashboard/templates/index.html +++ b/dashboard/templates/index.html @@ -5,6 +5,13 @@
Vocabulary Size: {{ vocab_size }}
+Vocabulary Size: {{ vocab_size }}
+ +