Downloads · 30 days
7
10% of all-time downloads
destonedbob/nusiss-election-project-aspect-seq2seq-model-facebook-bart-large
nusiss-election-project-aspect-seq2seq-model-facebook-bart-large is a text generation model from destonedbob. Use it when you need the model to write or continue text.
Finetuned model for a university project to identify aspect relating to a specific entity within sentence (Possible entities Trump, Kamala, Others).
Downloads · 30 days
7
10% of all-time downloads
All-time downloads
70
Public
Repo size
3.3 GB
Likes
0
Public
Click a slice to open those files.
.bin1.6 GB · 100%
From the Hugging Face model README
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)