Finetuned model for a university project to identify entity within sentence (Trump, Kamala, Others).
Input test format: entity of interest: <entity> [SEP] aspect of interest: <aspect> [SEP] <sentence>
For Others, entity should be "neither trump nor kamala".
Expected aspects: 'campaign', 'communication', 'competence', 'controversies', 'ethics and integrity', 'leadership', 'personality trait', 'policies', 'political ideology', 'public image', 'public service record', 'relationships and alliances', 'voter sentiment', 'others'
model = AutoModelForSeq2SeqLM.from_pretrained('destonedbob/nusiss-election-project-sentiment-seq2seq-model-facebook-bart-large')
tokenizer = AutoTokenizer.from_pretrained('destonedbob/nusiss-election-project-sentiment-seq2seq-model-facebook-bart-large')
my_pipeline = pipeline('text2text-generation', model=model, tokenizer=tokenizer)
df = pd.DataFrame([
'entity of interest: trump [SEP] aspect of interest: controversies [SEP] I think Trump is a criminal',
'entity of interest: trump [SEP] aspect of interest: policies [SEP] I think Trump has lousy ideas when it comes to the economy',
'entity of interest: kamala [SEP] aspect of interest: competence [SEP] Kamala cannot run a country, all she does is laugh',
'entity of interest: neither trump nor kamala [SEP] aspect of interest: communication [SEP] Biden did not make any sense during his debate',
'entity of interest: kamala [SEP] aspect of interest: competence [SEP] Kamala is a really intelligent woman'
], columns=['sentence'])
my_pipeline(df.sentence.tolist(), batch_size=5)
- Downloads last month
- 92
Model tree for destonedbob/nusiss-election-project-sentiment-seq2seq-model-facebook-bart-large
Base model
facebook/bart-large