rearrange for quick dev

This commit is contained in:
wassname
2019-12-25 07:38:10 +08:00
parent 535c4cf9d1
commit 5c74a923ff
+6 -4
View File
@@ -109,8 +109,7 @@ class AIPlayer:
return clean_suggested_action(result_raw, min_length=settings.getint('action-min-length'))
def play():
generator = getGenerator()
def play(generator):
story_manager = UnconstrainedStoryManager(generator)
ai_player = AIPlayer(generator)
print("\n")
@@ -317,5 +316,8 @@ def play():
colPrint("Sorry about that...where were we?", colors["query"])
colPrint(result, colors["ai-text"])
#TODO: there's no reason for this to be enclosed in a function
play()
# This is here for rapid development, without reloading the model. You import play into a jupyternotebook with autoreload
if __name__ == "__main__":
generator = getGenerator()
play(generator)