From 2cc4b968072aac6942a7bacecf797e5b5ee00820 Mon Sep 17 00:00:00 2001 From: wassname Date: Wed, 25 Dec 2019 08:08:48 +0800 Subject: [PATCH] fixes --- gpt2generator.py | 1 + play.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/gpt2generator.py b/gpt2generator.py index 84b69e6..3baf8fa 100644 --- a/gpt2generator.py +++ b/gpt2generator.py @@ -1,4 +1,5 @@ import os +import itertools import torch import torch.nn.functional as F diff --git a/play.py b/play.py index 15348d7..d9c389d 100644 --- a/play.py +++ b/play.py @@ -172,7 +172,7 @@ def play(generator): action_suggestion_lines = 1 for i in range(settings.getint('action-alternatives')): # FIXME it might be better to pass in a longer history - story_manager.story_context() # This should be within the loop as it has a random sampling element + action_prompt = story_manager.story_context() # This should be within the loop as it has a random sampling element action_prompt[-1] += '> ' logger.debug("action_prompt %s", action_prompt) suggested_action = ai_player.get_action(action_prompt)