Transformers
PyTorch
Safetensors
English
t5
text2text-generation
finbert
financial-sentiment-analysis
sentiment-analysis
text-generation-inference
Instructions to use amphora/FinABSA-Longer with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use amphora/FinABSA-Longer with Transformers:
# Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("amphora/FinABSA-Longer") model = AutoModelForSeq2SeqLM.from_pretrained("amphora/FinABSA-Longer", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -23,12 +23,12 @@ You can use this model directly using the AutoModelForSeq2SeqLM class.
|
|
| 23 |
>>> input_str = "[TGT] stocks dropped 42% while Samsung rallied."
|
| 24 |
>>> input = tokenizer(input_str, return_tensors='pt')
|
| 25 |
>>> output = model.generate(**input, max_length=20)
|
| 26 |
-
>>> print(output)
|
| 27 |
The sentiment for [TGT] in the given sentence is NEGATIVE.
|
| 28 |
>>> input_str = "Tesla stocks dropped 42% while [TGT] rallied."
|
| 29 |
>>> input = tokenizer(input_str, return_tensors='pt')
|
| 30 |
>>> output = model.generate(**input, max_length=20)
|
| 31 |
-
>>> print(output)
|
| 32 |
The sentiment for [TGT] in the given sentence is POSITIVE.
|
| 33 |
```
|
| 34 |
## Evaluation Results
|
|
|
|
| 23 |
>>> input_str = "[TGT] stocks dropped 42% while Samsung rallied."
|
| 24 |
>>> input = tokenizer(input_str, return_tensors='pt')
|
| 25 |
>>> output = model.generate(**input, max_length=20)
|
| 26 |
+
>>> print(tokenizer.decode(output[0]))
|
| 27 |
The sentiment for [TGT] in the given sentence is NEGATIVE.
|
| 28 |
>>> input_str = "Tesla stocks dropped 42% while [TGT] rallied."
|
| 29 |
>>> input = tokenizer(input_str, return_tensors='pt')
|
| 30 |
>>> output = model.generate(**input, max_length=20)
|
| 31 |
+
>>> print(tokenizer.decode(output[0]))
|
| 32 |
The sentiment for [TGT] in the given sentence is POSITIVE.
|
| 33 |
```
|
| 34 |
## Evaluation Results
|