diff --git a/generator/ctrl/ctrl_generator.py b/generator/ctrl/ctrl_generator.py index c1afbf7..1ab6c1d 100644 --- a/generator/ctrl/ctrl_generator.py +++ b/generator/ctrl/ctrl_generator.py @@ -20,7 +20,7 @@ def loss(labels, logits): class CTRLGenerator(): - def __init__(self, control_code="Writing Text: ", generate_num=80, temperature=0.3): + def __init__(self, control_code="Writing Text: ", generate_num=80, temperature=0.2): self.generate_num=generate_num model_dir = "generator/ctrl/model/seqlen256_v1.ckpt/" @@ -217,7 +217,7 @@ class CTRLGenerator(): # disallow some tokens forbidden_tokens = ['', 'Sco@@', "&@@", "1]@@", "2]@@", "3]@@", "4]@@", "https://www.@@", "[@@", ":@@", - "Edit", "&@@", "2:","1:", ":", "Edit@@"] + "Edit", "&@@", "2:","1:", ":", "Edit@@", "EDI@@", "EDIT@@"] if num_new_lines > self.max_new_lines: forbidden_tokens.append("\n") diff --git a/story/utils.py b/story/utils.py index 59bc5a9..a6fa4a6 100644 --- a/story/utils.py +++ b/story/utils.py @@ -120,7 +120,7 @@ first_to_second_mappings = [ second_to_first_mappings = [ ("you're", "I'm"), - ("your", "my "), + ("your", "my"), ("you are", "I am"), ("you", "I"), ("you", "me"),