This commit is contained in:
Nick Walton
2019-11-18 22:59:20 -07:00
parent dd7b3d9c65
commit 7b937a1585
2 changed files with 6 additions and 4 deletions
+5 -3
View File
@@ -40,11 +40,13 @@ def play_unconstrained():
if action != "":
action = action.strip()
action = action[0].upper() + action[1:]
action = first_to_second_person(action)
if "You" not in action:
action = "You " + action
action = "\n> " + action + "\n"
# action = remove_profanity(action)
# action = first_to_second_person(action)
result = "\n" + story_manager.act(action)
if player_died(result):
+1 -1
View File
@@ -11,7 +11,7 @@ tf.compat.v1.logging.set_verbosity(tf.compat.v1.logging.ERROR)
class GPT2Generator:
def __init__(self, generate_num=64, temperature=0.3, top_k=40, top_p=0.9):
def __init__(self, generate_num=64, temperature=0.4, top_k=40, top_p=0.9):
self.generate_num=generate_num
self.temp = temperature
self.top_k = top_k