Hello and welcome to our Forum 
I’d suggest you to use the Text Classification pipeline 1 instead.
from transformers import pipeline
clf = pipeline("text-classification", fine_tuned_model)
answer = clf("text)