######################################################################
-def complete(model, primer, nb_sentences = 1, nb_token_max = 100, temperature = None):
+def complete(model, tokenizer,
+ primer,
+ nb_sentences = 1, nb_token_max = 100, temperature = None):
nt, ns = 0, 0
tokens = tokenizer.encode(primer)
primer_len = len(tokens)
model.eval()
print(
- complete(model,
+ complete(model, tokenizer,
'The object was blue all over, but also green all over, it was a',
)
)