does someone can help me whith this error?
Iām not a mentor for that course.
But this type of error generally happens if your code is returning a list where a scalar value was expected.
From what I can see,
# The text generation stops if the model predicts the EOS token
this needs to check for a word (natural language).
Also, I see the way you are concatenating is not right in your tokenized answer!
1 Like
hi @Joselyne16
as @gent.spah mentioned the code line
The text generation stops if the model predicts the EOS token
is where your code is incorrect.
Remember that instruction mentions text generation stops when it reaches eos meaning if statement needs to be used here for variable next_word and not tokenized_answer as the next text generation would be next word and if it has reached end of sequence (eos), text generation would break or stop.
Regards
DP
1 Like
