From 7b937a1585185486c6b8b4e5ad3fa3a6553c2b9e Mon Sep 17 00:00:00 2001 From: Nick Walton Date: Mon, 18 Nov 2019 22:59:20 -0700 Subject: [PATCH] update --- console_play.py | 8 +++++--- generator/gpt2/gpt2_generator.py | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/console_play.py b/console_play.py index 4f25377..48f809a 100644 --- a/console_play.py +++ b/console_play.py @@ -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): diff --git a/generator/gpt2/gpt2_generator.py b/generator/gpt2/gpt2_generator.py index 94361c1..ab2bb11 100644 --- a/generator/gpt2/gpt2_generator.py +++ b/generator/gpt2/gpt2_generator.py @@ -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