-
Notifications
You must be signed in to change notification settings - Fork 0
/
generate.py
38 lines (36 loc) · 978 Bytes
/
generate.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
from textgenrnn import textgenrnn
t = textgenrnn('weights/textgenrnn_goddesses_40epochs.hdf5')
generated_texts = t.generate(n=20, return_as_list=True, temperature=1.2)
print(*generated_texts, sep = "\n")
# Using generate_samples() is a great way to test the model at different temperatures.
# textgen.generate_samples()
# https://github.com/minimaxir/textgenrnn/blob/master/docs/textgenrnn-demo.ipynb
"""
20 = number of things
The temperature, which is like a creativity dial. At 0.1, you’ll get very basic output that’s
probably even more boring than what you fed in. At 1.0, the output will get so creative that
often what comes out isn’t even real words. You can go higher than 1.0, if you dare.
"""
"""
first run at temp 1.5
Vancughā
Slivatle
Khiri Qabidhiku
Kr Cylzi
Phtsua Kusa
Vara-hime
Shat
Utt-tntak
Morgakne Axidanymena
Ccngaw
Taktara
Dragernahat
Mattenfá-tursidæneg Utt
Candesicalo
Nlahmith
e-qeleot-hime
Take-Mu
Pbhilu
Dziyigê Mabiena
Mrmi Arkala
"""