Views
No views yet
# Model usage
from transformers import pipeline
model_path = "eevvgg/Stance-Tw"
cls_task = pipeline(task = "text-classification", model = model_path, tokenizer = model_path)#, device=0
sequence = ['his rambling has no clear ideas behind it',
'That has nothing to do with medical care',
"Turns around and shows how qualified she is because of her political career.",
'She has very little to gain by speaking too much']
result = cls_task(sequence)
labels = [i['label'] for i in result]
labels # ['attack', 'neutral', 'support', 'attack']