text_to_classify="i am your father"
predicted_class=self_pipe_line(text_to_classify)print(f"predict class: {predicted_class}")
Some weights of GPT2ForSequenceClassification were not initialized from the model checkpoint at ./model/gpt2 and are newly initialized: ['score.weight']
You should probably TRAIN this model on a down-stream task to be able to use it for predictions and inference.predict class: tensor([1])