mirror of
https://github.com/wassname/Clover-Edition.git
synced 2026-09-09 11:13:26 +08:00
update
This commit is contained in:
@@ -263,11 +263,11 @@ class CTRLGenerator():
|
||||
# you can delete theme from the pruned_list
|
||||
# you can comment this out, I'm keeping it in for demonstration purpose
|
||||
tokens_to_disallow = []
|
||||
complex_to_dissalow = ["http", "r/nosleep", "EDIT", "UPDATE", "&"]
|
||||
for _ in range(len(pruned_list)):
|
||||
complex_to_dissalow = ["http", "r/nosleep", "EDIT", "UPDATE", "&", "[Part", "**", "[Link ", "www."]
|
||||
for i in range(len(pruned_list)):
|
||||
for complex in complex_to_dissalow:
|
||||
if complex in self.idx2word[pruned_list[_]]:
|
||||
tokens_to_disallow.append(_)
|
||||
if complex in self.idx2word[pruned_list[i]]:
|
||||
tokens_to_disallow.append(i)
|
||||
pruned_list = np.delete(pruned_list, tokens_to_disallow)
|
||||
|
||||
# if temperature is 0
|
||||
|
||||
@@ -40,9 +40,9 @@ class Story():
|
||||
|
||||
def latest_result(self):
|
||||
if len(self.results) > 1:
|
||||
return self.results[-2] + self.actions[-1] + self.results[-1]
|
||||
return self.results[-2] + self.actions[-1] + self.results[-1] + self.actions[-1]
|
||||
elif len(self.results) == 1:
|
||||
return self.story_start + self.results[-1]
|
||||
return self.story_start + self.results[-1] + self.actions[-1]
|
||||
else:
|
||||
return self.story_start
|
||||
|
||||
@@ -208,8 +208,6 @@ class CTRLStoryManager(ConstrainedStoryManager):
|
||||
for phrase in self.action_phrases:
|
||||
result = self.generate_action_result(self.story_context(), phrase, options=options)
|
||||
location = result[0].split()[location_pos+1]
|
||||
print("result is ", result)
|
||||
print("location is ", location)
|
||||
options["word_whitelist"][location_pos].remove(location)
|
||||
|
||||
results.append(result)
|
||||
|
||||
Reference in New Issue
Block a user