Prevented a log from being tracked, made some minor fixes.
This commit is contained in:
parent
6eb63097fa
commit
ba126bbce3
3
.gitignore
vendored
3
.gitignore
vendored
@ -169,4 +169,5 @@ cython_debug/
|
|||||||
#.idea/
|
#.idea/
|
||||||
|
|
||||||
/tokenizer_vocab.txt
|
/tokenizer_vocab.txt
|
||||||
/logs/core_dreams.txt
|
/logs/core_dreams.txt
|
||||||
|
/logs/best_dream.txt
|
@ -47,6 +47,8 @@ def home():
|
|||||||
<body>
|
<body>
|
||||||
<h1>🌸 Ruby's Dashboard</h1>
|
<h1>🌸 Ruby's Dashboard</h1>
|
||||||
<p><b>Vocabulary Size:</b> {{ vocab_size }}</p>
|
<p><b>Vocabulary Size:</b> {{ vocab_size }}</p>
|
||||||
|
<h3>🏆 Highest Scoring Dream</h3>
|
||||||
|
<p><b>{{ best_dream }}</b></p>
|
||||||
|
|
||||||
<h3>🧠 Recent Daydreams</h3>
|
<h3>🧠 Recent Daydreams</h3>
|
||||||
<ul>
|
<ul>
|
||||||
@ -68,11 +70,10 @@ def home():
|
|||||||
{{ err }}
|
{{ err }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</pre>
|
</pre>
|
||||||
<h3>🏆 Highest Scoring Dream</h3>
|
|
||||||
<p><b>{{ best_dream }}</b></p>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
""", dreams=dreams[::-1], messages=messages[::-1], errors=errors[::-1], vocab_size=vocab_size)
|
""", best_dream=best_dream, dreams=dreams[::-1], messages=messages[::-1], errors=errors[::-1], vocab_size=vocab_size)
|
||||||
|
|
||||||
|
|
||||||
def start_dashboard():
|
def start_dashboard():
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|
||||||
|
|
||||||
class RubyState:
|
class RubyState:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.last_message_time = datetime.utcnow()
|
self.last_message_time = datetime.utcnow()
|
||||||
|
@ -250,4 +250,8 @@ class RubyTrainer:
|
|||||||
if len(set(words)) > len(words) * 0.75:
|
if len(set(words)) > len(words) * 0.75:
|
||||||
score += 1 # diversity bonus
|
score += 1 # diversity bonus
|
||||||
|
|
||||||
|
word_counts = {w: words.count(w) for w in set(words)}
|
||||||
|
if any(count >= 3 for count in word_counts.values()):
|
||||||
|
score -= 1 # repetition penalty
|
||||||
|
|
||||||
return score # max 5.0
|
return score # max 5.0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user