Reloading a saved fine-tuned model trained using the Trainer Object from Huggingface does not yield correct predictions
I am trying to load a saved fine-tuned model that has been saved locally in my Google drive. I performed sentiment analysis using Roberta model and saved the model. The model was also predicting correctly with utmost accuracy using the Trainer object, but when I loaded the saved model, it only predicts ‘0’ for negative sentiments. My conclusion is that the model is not being retrieved efficiently.from transformers import RobertaForSequenceClassification,RobertaTokenizer 
model = RobertaForSequenceClassification.from_pretrained("/content/drive/MyDrive/senti-model", local_files_only=True)
tokenizer=RobertaTokenizer.from_pretrained("/content/drive/MyDrive/senti-model")

from transformers import pipeline 
classifier = pipeline("sentiment-analysis",model=model,tokenizer=tokenizer) predicted_output_from_model=classifier(val_texts)
print(predicted_output_from_model)[{‘label’: ‘NEGATIVE’, ‘score’: 0.5003366470336914}, {‘label’: ‘NEGATIVE’, ‘score’: 0.5003368854522705}, {‘label’: ‘NEGATIVE’, ‘score’: 0.5003371834754944}, {‘label’: ‘NEGATIVE’, ‘score’: 0.500337541103363}, {‘label’: ‘NEGATIVE’, ‘score’: 0.5003368854522705}, {‘label’: ‘NEGATIVE’, ‘score’: 0.5003374814987183}, {‘label’: ‘NEGATIVE’, ‘score’: 0.5003378987312317}, {‘label’: ‘NEGATIVE’, ‘score’: 0.5003373026847839}, {‘label’: ‘NEGATIVE’, ‘score’: 0.5003367066383362}, {‘label’: ‘NEGATIVE’, ‘score’: 0.5003374218940735}]The same label and score get predicted for all the texts. I checked to see if my validation texts are all different, and they are. I have these files in my senti-model: config.json, pytorch_model.bin, special_tokens_map.json, tokenizer_config.json, training_args.bin, vocab.json. Thanks