diff --git a/console_play.py b/console_play.py index e9dd78a..2000c5e 100644 --- a/console_play.py +++ b/console_play.py @@ -48,7 +48,7 @@ def play_constrained(): story_manager = CTRLStoryManager(generator) story_manager.start_new_story(prompt) - console_print("\n\n\n") + console_print("\n") console_print(str(story_manager.story)) possible_actions = story_manager.get_possible_actions() while (True): diff --git a/generator/ctrl/ctrl_generator.py b/generator/ctrl/ctrl_generator.py index 99e94c8..13828de 100644 --- a/generator/ctrl/ctrl_generator.py +++ b/generator/ctrl/ctrl_generator.py @@ -22,7 +22,7 @@ def loss(labels, logits): class CTRLGenerator(): - def __init__(self, control_code="Horror Text: ", generate_num=64, temperature=0.3): + def __init__(self, control_code="Horror Text: ", generate_num=100, temperature=0.3): self.generate_num=generate_num model_dir = "generator/ctrl/model/seqlen256_v1.ckpt/" diff --git a/story/utils.py b/story/utils.py index 1609c56..d3e1e26 100644 --- a/story/utils.py +++ b/story/utils.py @@ -72,9 +72,11 @@ def replace_outside_quotes(text, current_word, repl_word): first_to_second_mappings = [ ("I'm ", "you're "), (" I'm ", " you're "), + (" I'm ", " you're "), ("I am ", "you are "), ("I ", "you "), ("I've ", "You've "), + (" I've ", " You've "), ("my ", "your "), (" my ", " your "), ("My ", "Your "),