So if you take the template

Now you take a bidirectional model, feed ??? and the model outputs a probability distribution ??? and take the probability of ???.

and try to make it as precise as the I did for the unidirectional case:

after feeding c_0 … c_n, the model outputs a probability distribution p over the alphabet and perplexity is exp(-p(c_{n+1}), where we took c_{n+1} from the ground truth, you take and you take the expectation / average over your validation set.

you find that it is hard (impossible?) to do without having the target somehow showing up in the input.
So in your version, you put in “the input” and “the target” where you would have to specify what the input is and what the target is. You could try to feed in prefixes of sentences and then predict the next word, but the internal states are quite different to what they would be if you fed in the next word as well. This is in stark contrast to the unidirectional case.
Best regards
Thomas