mirror of
https://github.com/wassname/Clover-Edition.git
synced 2026-09-09 11:13:26 +08:00
update
This commit is contained in:
@@ -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):
|
||||
|
||||
@@ -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():
|
||||
|
||||
|
||||
Reference in New Issue
Block a user