From 95f8acbaff4b2e650fb7866a5a091d478141d82e Mon Sep 17 00:00:00 2001 From: Nick Walton Date: Mon, 18 Nov 2019 23:18:00 -0700 Subject: [PATCH] update --- generator/gpt2/gpt2_generator.py | 3 +-- play.py | 5 ++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/generator/gpt2/gpt2_generator.py b/generator/gpt2/gpt2_generator.py index 5ac4497..1bb7524 100644 --- a/generator/gpt2/gpt2_generator.py +++ b/generator/gpt2/gpt2_generator.py @@ -3,12 +3,11 @@ import warnings warnings.filterwarnings("ignore") import os import tensorflow as tf +tf.compat.v1.logging.set_verbosity(tf.compat.v1.logging.ERROR) from generator.gpt2.src import sample, encoder, model import json import numpy as np -tf.compat.v1.logging.set_verbosity(tf.compat.v1.logging.ERROR) - class GPT2Generator: def __init__(self, generate_num=48, temperature=0.4, top_k=40, top_p=0.9): diff --git a/play.py b/play.py index 686118d..6660d15 100644 --- a/play.py +++ b/play.py @@ -34,8 +34,7 @@ def select_game(): print("Which game would you like to play?") options = ["zombies", "hospital", "peasant", "apocalypse", "classic", "knight", "necromancer", "vague"] for i, option in enumerate(options): - console_print(str(i) + ") " + option + ": " + get_context(option)) - print("\n") + console_print(str(i) + ") " + option + ": " + get_context(option) + "\n") choice = get_num_options(len(options)) return options[choice] @@ -46,7 +45,7 @@ def instructions(): text += '\n* Just press enter with no action if you want to let the story continue.' text += '\n* Enter "restart" for any action to end your game and start a new one' text += '\n* Enjoy!' - + return text def play_aidungeon_2():