Finetuned model for a university project to identify aspect relating to a specific entity within sentence (Possible entities Trump, Kamala, Others).
Input test format: entity of interest: <entity> [SEP] <sentence>
For Others, entity should be "neither trump nor kamala"
model_name = 'destonedbob/nusiss-election-project-aspect-seq2seq-model-facebook-bart-large'
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSeq2SeqLM.from_pretrained(model_name)
pipeline = pipeline('text2text-generation', model=model, tokenizer=tokenizer)
df = pd.DataFrame([
'entity of interest: trump [SEP] I think Trump is a criminal',
'entity of interest: trump [SEP] I think Trump has lousy ideas when it comes to the economy',
'entity of interest: kamala [SEP] Kamala cannot run a country, all she does is laugh',
'entity of interest: neither trump nor kamala [SEP] Biden did not make any sense during his debate'
], columns=['sentence'])
pipeline(df.sentence.tolist(), batch_size=2)
- Downloads last month
- 116
Model tree for destonedbob/nusiss-election-project-aspect-seq2seq-model-facebook-bart-large
Base model
facebook/bart-large