mirror of
https://github.com/wassname/Clover-Edition.git
synced 2026-09-11 11:51:53 +08:00
update
This commit is contained in:
@@ -207,7 +207,7 @@ class CTRLGenerator():
|
||||
# Make sure only a possible verb is chosen.
|
||||
if first_token:
|
||||
for word in get_possible_verbs():
|
||||
prompt_logits[_token][self.word2idx[word]] += 0.1
|
||||
prompt_logits[_token][self.word2idx[word]] *= 1000
|
||||
first_token = False
|
||||
|
||||
# compute probabilities from logits
|
||||
|
||||
+2
-2
@@ -90,7 +90,7 @@ first_to_second_mappings = [
|
||||
(" me", " you"),
|
||||
(" us ", " you "),
|
||||
(" us.", " you."),
|
||||
("our ", "your ")
|
||||
(" our", " your")
|
||||
]
|
||||
|
||||
second_to_first_mappings = [
|
||||
@@ -134,7 +134,7 @@ def second_to_first_person(text):
|
||||
return capitalize_first_letters(text)
|
||||
|
||||
|
||||
possible_verbs = ["go", "run", "open", "look", "walk", "make", "try", "say", "tell", "attack", "use", "turn", "fight", "scream", "yell"]
|
||||
possible_verbs = ["ask", "go", "run", "open", "look", "walk", "make", "try", "say", "tell", "attack", "use", "turn", "fight", "scream", "yell"]
|
||||
|
||||
def get_possible_verbs():
|
||||
return possible_verbs
|
||||
|
||||
Reference in New Issue
Block a user