mirror of
https://github.com/wassname/Clover-Edition.git
synced 2026-09-09 11:13:26 +08:00
refactored
This commit is contained in:
@@ -323,7 +323,7 @@ class CTRLGenerator():
|
||||
if self.idx2word[idx] is "\n":
|
||||
num_new_lines += 1
|
||||
|
||||
#print("Generated token is ", repr(self.idx2word[idx]))
|
||||
print(self.idx2word[idx], end=" ")
|
||||
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user