Instructions to use bardsai/finance-sentiment-pl-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use bardsai/finance-sentiment-pl-base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="bardsai/finance-sentiment-pl-base")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("bardsai/finance-sentiment-pl-base") model = AutoModelForSequenceClassification.from_pretrained("bardsai/finance-sentiment-pl-base", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download README.md from bardsai/finance-sentiment-pl-base: direct link, hf CLI and curl.
- Browser
- Download file 2.05 kB
-
https://huggingface.co/bardsai/finance-sentiment-pl-base/resolve/62faca2bdd2b55cedf3941780392fbf4d1f19f2c/README.md
- Command line
-
hf download hf://bardsai/finance-sentiment-pl-base@62faca2bdd2b55cedf3941780392fbf4d1f19f2c/README.md
-
curl -L -o README.md https://huggingface.co/bardsai/finance-sentiment-pl-base/resolve/62faca2bdd2b55cedf3941780392fbf4d1f19f2c/README.md
language: pl
tags:
- text-classification
- financial-sentiment-analysis
- sentiment-analysis
datasets:
- datasets/financial_phrasebank
metrics:
- f1
- accuracy
- precision
- recall
widget:
- text: Sprzedaż netto wzrosła o 30% do 36 mln EUR.
example_title: Example 1
- text: Rusza Black Friday. Lista promocji w sklepach.
example_title: Example 2
- text: >-
Akcje CDPROJEKT zanotowały największy spadek wśród spółek notowanych na
GPW.
example_title: Example 3
FinanceSentimentPL-base
FinanceSentimentPL-fast is a model based on herbert-base for analyzing sentiment of Polish financial news. It was trained on the translated version of Financial PhraseBank by Malo et al. (20014) for 10 epochs on single RTX3090 gpu.
The model will give you a three labels: positive, negative and neutral.
How to use
You can use this model directly with a pipeline for sentiment-analysis:
from transformers import pipeline
nlp = pipeline("sentiment-analysis", model="bardsai/FinanceSentimentPL-fast")
nlp("Sprzedaż netto wzrosła o 30% do 36 mln EUR.")
[{'label': 'positive', 'score': 0.9999998807907104}]
Performance
| Metric | Value |
|---|---|
| f1 macro | 0.969 |
| precision macro | 0.971 |
| recall macro | 0.968 |
| accuracy | 0.976 |
| samples per second | 136.8 |
(The performance was evaluated on RTX 3090 gpu)
Changelog
- 2022-11-15: Initial release
About bards.ai
At bards.ai, we focus on providing machine learning expertise and skills to our partners, particularly in the areas of nlp, machine vision and time series analysis. Our team is located in Wroclaw, Poland. Please visit our website for more information: bards.ai
Let us know if you use our model :). Also, if you need any help, feel free to contact us at info@bards.ai