This commit is contained in:
Nick Walton
2019-11-18 23:18:00 -07:00
parent 9418fe6d5f
commit 95f8acbaff
2 changed files with 3 additions and 5 deletions
+1 -2
View File
@@ -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):
+2 -3
View File
@@ -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():