negative (0), positive (1)bert-base-uncasedTrainer API)Note: In the training notebook, the model was fine-tuned on a small subset (640 train / 640 validation) for demonstration purposes. For production use, fine-tune on the full dataset and validate thoroughly.
Trainerglue, config sst2sentencelabel (0/1)train: selected range(640)validation: selected range(640)test: predictions generated without labels (GLUE test split)AutoTokenizer.from_pretrained("bert-base-uncased")truncation=True)DataCollatorWithPaddingaccuracy on validationreport_to="none")0.86250.339197456836700441from transformers import pipeline
2
3model_id = "UnMelow/422_zhuravlev"
4
5clf = pipeline(
6 "text-classification",
7 model=model_id,
8 tokenizer=model_id,
9 return_all_scores=False
10)
11
12print(clf("This movie was surprisingly good!"))
13print(clf("The plot was boring and predictable."))