Stuck at C4W1 Q7. both test failed

(Solution code removed, as posting it publicly is against the honour code of this community)

I dont know what is going wrong i have also compared my code online available. But still facing this error.
both test cases failed

Hi @Saqib_Ur_Rehman1,

Thank you for taking our courses and welcome to our Community! We are so glad you joined!

First off, please know, it is against the honour code of this Community to share your solutions publicly. For starters, you can share your error output instead. And if the need would arise, the mentors would direct message you to look at your notebook/code. I have removed your solution.

As for your code, one thing that stood out is that you have modified your function. If you take a look at the very start of your assignment, there are 5 things you are not supposed to be doing, and changing the function is one of them.

The original function is this:

def sampling_decode(input_sentence, NMTAttn = None, temperature=0.0, vocab_file=None, vocab_dir=None, next_symbol=next_symbol, tokenize=tokenize, detokenize=detokenize):

But you have changed it to this:

def sampling_decode(input_sentence, NMTAttn = None, temperature=0.0, vocab_file=None, vocab_dir=None):

Start by fixing this and letting me know what happens.

Best,
Mubsi