Get the class with the highest probability:

predicted_class = logits.argmax().item()
predicted_class
'0'

Tokenize each prompt and candidate answer pair and return TensorFlow tensors:

from transformers import AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("my_awesome_swag_model")
inputs = tokenizer([[prompt, candidate1], [prompt, candidate2]], return_tensors="tf", padding=True)

Pass your inputs to the model and return the logits: