mirror of
https://github.com/wassname/Clover-Edition.git
synced 2026-09-10 11:40:48 +08:00
update
This commit is contained in:
@@ -20,7 +20,7 @@ def loss(labels, logits):
|
||||
|
||||
class CTRLGenerator():
|
||||
|
||||
def __init__(self, control_code="Writing Text:", generate_num=60, temperature=0.5, topk=40, nucleus_prob=0):
|
||||
def __init__(self, control_code="Writing Text:", generate_num=45, temperature=0.5, topk=40, nucleus_prob=0):
|
||||
|
||||
self.generate_num=generate_num
|
||||
model_dir = "generator/ctrl/training_utils/seqlen256_v1.ckpt/"
|
||||
|
||||
@@ -7,7 +7,7 @@ prompts:
|
||||
|
||||
vague_police: "You are a police officer. You get to work and "
|
||||
|
||||
apocalypse: "You walk for two hours and take a break. You've left the town you were in and are now in a more rural area. There's a building to your right and you see"
|
||||
apocalypse: "You walk for two hours and take a break. You've left the town you were in and are now in a more rural area. There's a building to your right and you see "
|
||||
|
||||
action_verbs:
|
||||
classic: ["You attack", "You tell", "You use", "You go"]
|
||||
|
||||
@@ -42,7 +42,7 @@ class Story():
|
||||
|
||||
def latest_result(self):
|
||||
if len(self.results) >= 2:
|
||||
return self.context + self.results[-1] + self.actions[-1] + self.results[-1]
|
||||
return self.context + self.results[-2] + self.actions[-1] + self.results[-1]
|
||||
elif len(self.results) >= 1:
|
||||
return self.context + self.actions[-1] + self.results[-1]
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user