FinABSA is a T5-Large model trained for Aspect-Based Sentiment Analysis(ABSA) tasks using
SEntFiN 1.0
. Unlike traditional sentiment analysis models which predict a single sentiment label for each sentence, FinABSA has been trained to disambiguate sentences containing multiple aspects. By replacing the target aspect with a [TGT] token the model predicts the sentiment concentrating to the aspect.
GitHub Repo
How to use
You can use this model directly using the AutoModelForSeq2SeqLM class.
>>> from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
>>> tokenizer = AutoTokenizer.from_pretrained("amphora/FinABSA")
>>> model = AutoModelForSeq2SeqLM.from_pretrained("amphora/FinABSA")
>>> input_str = "[TGT] stocks dropped 42% while Samsung rallied.">>> input = tokenizer(input_str, return_tensors='pt')
>>> output = model.generate(**input, max_length=20)
>>> print(output)
The sentiment for [TGT] in the given sentence is NEGATIVE.
>>> input_str = "Tesla stocks dropped 42% while [TGT] rallied.">>> input = tokenizer(input_str, return_tensors='pt')
>>> output = model.generate(**input, max_length=20)
>>> print(output)
The sentiment for [TGT] in the given sentence is POSITIVE.
Evaluation Results
Using a test split arbitarly extracted from
SEntFiN 1.0
the model scores an average accuracy of 87%.
Runs of amphora FinABSA on huggingface.co
1.5K
Total runs
15
24-hour runs
61
3-day runs
68
7-day runs
656
30-day runs
More Information About FinABSA huggingface.co Model
FinABSA huggingface.co is an AI model on huggingface.co that provides FinABSA's model effect (), which can be used instantly with this amphora FinABSA model. huggingface.co supports a free trial of the FinABSA model, and also provides paid use of the FinABSA. Support call FinABSA model through api, including Node.js, Python, http.
FinABSA huggingface.co is an online trial and call api platform, which integrates FinABSA's modeling effects, including api services, and provides a free online trial of FinABSA, you can try FinABSA online for free by clicking the link below.
amphora FinABSA online free url in huggingface.co:
FinABSA is an open source model from GitHub that offers a free installation service, and any user can find FinABSA on GitHub to install. At the same time, huggingface.co provides the effect of FinABSA install, users can directly use FinABSA installed effect in huggingface.co for debugging and trial. It also supports api for free installation.