C5W1A2 Exercise 4 model: TypeError: sample()

In the model() function I am getting this error:

     88                 # Sample indices and print them
---> 89                 sampled_indices = sample(parameters, char_to_ix, seed)
     90                 last_dino_name = get_sample(sampled_indices, ix_to_char)
     91                 print(last_dino_name.replace('\n', ''))

TypeError: sample() takes from 1 to 2 positional arguments but 3 were given

The error refers to a section in the code that is outside of the START ### END box and the sample() function takes arguments that aren’t generated in the edited code. My sample() function earlier in the notebook passes all the tests.

My model() code:

[Removed code from Moderator]

I’m not sure if the idx initialization is correct but the other parts seem ok I think.

After submission, I did receive a 100/100 grade though?