Predict the output of a text - Sentiment Analysis

Hi everyone,
I fine tuned distilbert sequence classification class on an English corpus with about 40,000 texts.
the model resulted the accuracy of 88 percent, but I can’t get true predicts for a text as an input.
Please help me, what should I do to fix this conflict.

this is the function I use to predict the output:
def predict_text(model,text):
inputs = tokenizer(text, return_tensors=“pt”)
inputs = { for k,v in inputs.items()}
with torch.no_grad():
outputs = model(**inputs)
y_out = np.argmax(outputs.logits.cpu(),axis=1)
return outputs

this is the way I call the function and it gives me positive class for this sentence:
predict_text(trainer.model,“Let’s try something else. It doesn’t work properly.”)

Your predict function is fine. The prediction returns a wrong result probably because the trained model can’t find a good fit for it. (Since you’ve already said that the accuracy is 0.88)

Thank you for your answer. What can I do to predict the right label in the output?