Downloads · 30 days
4
29% of all-time downloads
EuclidesHernandez/finbeto
finbeto is a machine learning model from EuclidesHernandez. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for peft.
finbeto-lora analyzes sentiment in Spanish financial news headlines. It is designed for financial text classification (positive, negative, neutral) in Spanish.
Downloads · 30 days
4
29% of all-time downloads
All-time downloads
14
Public
Repo size
904 KB
Likes
1
Public
Click a slice to open those files.
.safetensors904 KB · 48%
From the Hugging Face model README
finbeto-lora analyzes sentiment in Spanish financial news headlines. It is designed for financial text classification (positive, negative, neutral) in Spanish.
dccuchile/bert-base-spanish-wwm-caseddata/raw/financial_news.csv (Spanish headlines)data/processed/financial_phrasebank_google_translate_es.csv (PhraseBank, translated)| precision | recall | f1-score | support | |
|---|---|---|---|---|
| Positive | 0.78 | 0.69 | 0.73 | 1095 |
| Negative | 0.73 | 0.82 | 0.77 | 898 |
| Neutral | 0.78 | 0.81 | 0.80 | 750 |
| accuracy | 0.76 | 2743 | ||
| macro avg | 0.77 | 0.77 | 0.77 | 2743 |
| weighted avg | 0.77 | 0.76 | 0.76 | 2743 |
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
tokenizer = AutoTokenizer.from_pretrained("EuclidesHernandez/finbeto")
model = AutoModelForSequenceClassification.from_pretrained("EuclidesHernandez/finbeto")
text = "La empresa reportó un crecimiento significativo en el último trimestre."
inputs = tokenizer(text, return_tensors="pt")
with torch.no_grad():
logits = model(**inputs).logits
pred = torch.argmax(logits, dim=1).item()
print(["negative", "neutral", "positive"][pred])
For more information or to stay in touch, please visit: https://github.com/euclideshh/FinancialNewsSentimentAnalysis
MIT License