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():