Views
No views yet
1from transformers import AutoModelForSequenceClassification, AutoTokenizer
2
3model = AutoModelForSequenceClassification.from_pretrained("AndyChiang/Pre-CoFactv3-Text-Classification")
4tokenizer = AutoTokenizer.from_pretrained("AndyChiang/Pre-CoFactv3-Text-Classification")classifier = pipeline("text-classification", model=model, tokenizer=tokenizer)1label = classifier("Micah Richards spent an entire season at Aston Vila without playing a single game. [SEP] Despite speculation that Richards would leave Aston Villa before the transfer deadline for the 2018~19 season , he remained at the club , although he is not being considered for first team selection.")
2print(label)| Training | Validation | Testing | Total | |
|---|---|---|---|---|
| Support | 3500 | 750 | 750 | 5000 |
| Neutral | 3500 | 750 | 750 | 5000 |
| Refute | 3500 | 750 | 750 | 5000 |
| Total | 10500 | 2250 | 2250 | 15000 |
| Accuracy |
|---|
| 0.8502 |