mirror of
https://github.com/wassname/Clover-Edition.git
synced 2026-09-09 11:13:26 +08:00
Got it to a solid state. Still can work on past tense to present tense conversion and splititng action words at and and but, but making good progress.
This commit is contained in:
+1
-1
@@ -48,7 +48,7 @@ def play_constrained():
|
||||
story_manager = CTRLStoryManager(generator)
|
||||
story_manager.start_new_story(prompt)
|
||||
|
||||
console_print("\n\n\n")
|
||||
console_print("\n")
|
||||
console_print(str(story_manager.story))
|
||||
possible_actions = story_manager.get_possible_actions()
|
||||
while (True):
|
||||
|
||||
@@ -22,7 +22,7 @@ def loss(labels, logits):
|
||||
|
||||
class CTRLGenerator():
|
||||
|
||||
def __init__(self, control_code="Horror Text: ", generate_num=64, temperature=0.3):
|
||||
def __init__(self, control_code="Horror Text: ", generate_num=100, temperature=0.3):
|
||||
|
||||
self.generate_num=generate_num
|
||||
model_dir = "generator/ctrl/model/seqlen256_v1.ckpt/"
|
||||
|
||||
@@ -72,9 +72,11 @@ def replace_outside_quotes(text, current_word, repl_word):
|
||||
first_to_second_mappings = [
|
||||
("I'm ", "you're "),
|
||||
(" I'm ", " you're "),
|
||||
(" I'm ", " you're "),
|
||||
("I am ", "you are "),
|
||||
("I ", "you "),
|
||||
("I've ", "You've "),
|
||||
(" I've ", " You've "),
|
||||
("my ", "your "),
|
||||
(" my ", " your "),
|
||||
("My ", "Your "),
|
||||
|
||||
Reference in New Issue
Block a user