From c9a65db5125d9940e8346bfba14cfee42e32da61 Mon Sep 17 00:00:00 2001 From: Nick Date: Tue, 29 Oct 2019 09:23:10 -0600 Subject: [PATCH] update --- generator/ctrl/ctrl_generator.py | 2 +- story/story_data.yaml | 2 +- story/story_manager.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/generator/ctrl/ctrl_generator.py b/generator/ctrl/ctrl_generator.py index ba41f05..c0b4b88 100644 --- a/generator/ctrl/ctrl_generator.py +++ b/generator/ctrl/ctrl_generator.py @@ -20,7 +20,7 @@ def loss(labels, logits): class CTRLGenerator(): - def __init__(self, control_code="Writing Text:", generate_num=60, temperature=0.5, topk=40, nucleus_prob=0): + def __init__(self, control_code="Writing Text:", generate_num=45, temperature=0.5, topk=40, nucleus_prob=0): self.generate_num=generate_num model_dir = "generator/ctrl/training_utils/seqlen256_v1.ckpt/" diff --git a/story/story_data.yaml b/story/story_data.yaml index b087704..8f9ff4a 100644 --- a/story/story_data.yaml +++ b/story/story_data.yaml @@ -7,7 +7,7 @@ prompts: vague_police: "You are a police officer. You get to work and " - apocalypse: "You walk for two hours and take a break. You've left the town you were in and are now in a more rural area. There's a building to your right and you see" + apocalypse: "You walk for two hours and take a break. You've left the town you were in and are now in a more rural area. There's a building to your right and you see " action_verbs: classic: ["You attack", "You tell", "You use", "You go"] diff --git a/story/story_manager.py b/story/story_manager.py index be958fc..7466c85 100644 --- a/story/story_manager.py +++ b/story/story_manager.py @@ -42,7 +42,7 @@ class Story(): def latest_result(self): if len(self.results) >= 2: - return self.context + self.results[-1] + self.actions[-1] + self.results[-1] + return self.context + self.results[-2] + self.actions[-1] + self.results[-1] elif len(self.results) >= 1: return self.context + self.actions[-1] + self.results[-1] else: