From bb1739781fe5f9178794767267c01fb4afeeb798 Mon Sep 17 00:00:00 2001 From: Nick Walton Date: Fri, 27 Sep 2019 13:06:06 -0600 Subject: [PATCH] update --- console_play.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/console_play.py b/console_play.py index 4deccf5..c7dd24f 100644 --- a/console_play.py +++ b/console_play.py @@ -7,7 +7,7 @@ from generator.web.web_generator import * from generator.ctrl.ctrl_generator import * import tensorflow as tf import textwrap - +import sys CRED_FILE = "./AI-Adventure-2bb65e3a4e2f.json" # Set the key @@ -23,7 +23,10 @@ def console_print(str, pycharm=False): def play_unconstrained(): generator = CTRLGenerator() #generator = WebGenerator(CRED_FILE) - prompt = get_story_start("hospital") + if len(sys.argv) is 1: + prompt = get_story_start("hospital") + else: + prompt = sys.argv[1] story_manager = UnconstrainedStoryManager(generator) story_manager.start_new_story(prompt)