This commit is contained in:
nickwalton
2019-10-31 10:55:30 -06:00
parent cb912fdb93
commit b0bdf41783
3 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -24,7 +24,7 @@ def play_unconstrained():
generator = CTRLGenerator()
#generator = WebGenerator(CRED_FILE)
prompt = get_story_start("apocalypse")
context = get_context("apocalypse")
context = get_context("zombies")
story_manager = UnconstrainedStoryManager(generator)
story_manager.start_new_story(prompt, context=context)
+1 -1
View File
@@ -219,7 +219,7 @@ class CTRLGenerator():
forbidden_tokens = ['<unk>', 'Sco@@', "&amp@@", "1]@@", "2]@@", "3]@@", "4]@@", "https://www.@@", "[@@", ":@@",
"Edit", "&@@", "2:","1:", ":", "Edit@@", "EDI@@", "EDIT@@", "edit", "TL@@", "tl@@", ";@@",
'**', "http://@@", "Redd@@", "UP@@", "mom", "Up@@", "Me:", "Update", "mom@@", "Part",
"http://www.@@", "edit@@", "*@@", "Writing", "Text@@", "\\@@", "<br>@@", "<div", "|@@"]
"http://www.@@", "edit@@", "*@@", "Writing", "Text@@", "\\@@", "<br>@@", "<div", "|@@", '...']
for forbidden_token in forbidden_tokens:
prompt_logits[_token][self.word2idx[forbidden_token]] = -1e8
+2
View File
@@ -23,4 +23,6 @@ rooms:
haunted_hospital: ["lobby", "hallway", "parking", "roof", "pharmacy"]
contexts:
zombies: "A few months ago a zombie outbreak broke out. You now are trying to survive on the ruins of what's left in the midst of zombie hordes. "
apocalypse: "Long ago the bombs fell and the world ended. You are one of the few who is still alive. You are trying to survive by scavenging among the ruins of what is left behind. "