mirror of
https://github.com/wassname/Clover-Edition.git
synced 2026-09-09 11:13:26 +08:00
update
This commit is contained in:
@@ -324,6 +324,8 @@ class CTRLGenerator():
|
||||
if self.idx2word[idx] is "\n":
|
||||
num_new_lines += 1
|
||||
|
||||
print("Generated token is ", self.idx2word[idx])
|
||||
|
||||
tokens_generated_so_far = ' '.join([self.idx2word[c] for c in tokens_generated[0][len(text):].squeeze()[:token + 2]])
|
||||
tokens_generated_so_far = re.sub('(@@ )', '', string=tokens_generated_so_far)
|
||||
tokens_generated_so_far = re.sub('(@@ ?$)', '', string=tokens_generated_so_far)
|
||||
|
||||
Reference in New Issue
Block a user