Downloads · 30 days
11
24% of all-time downloads
Tasfiya025/FinancialNewsSentimentClassifier_DistilBERT
FinancialNewsSentimentClassifier_DistilBERT is a machine learning model from Tasfiya025. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
This is a fine-tuned DistilBERT model optimized for Sequence Classification to analyze the sentiment of financial news headlines and short articles. It categorizes the text into three classes: Bullish, Neutral, and Be…
Downloads · 30 days
11
24% of all-time downloads
All-time downloads
45
Public
Repo size
—
Likes
0
Public
Click a slice to open those files.
.md2.1 KB · 48%
From the Hugging Face model README
This is a fine-tuned DistilBERT model optimized for Sequence Classification to analyze the sentiment of financial news headlines and short articles. It categorizes the text into three classes: Bullish, Neutral, and Bearish, providing a quantifiable measure of market outlook derived from textual data. The model was trained on a comprehensive dataset of news articles from major financial publications, labeled by human experts.
This model is built upon the DistilBERT base uncased architecture, a smaller, faster, and lighter version of BERT.
distilbert-base-uncasedDistilBertForSequenceClassification)0: Bullish (Positive market sentiment)1: Neutral (No significant market impact)2: Bearish (Negative market sentiment)from transformers import pipeline
classifier = pipeline(
"sentiment-analysis",
model="[YOUR_HF_USERNAME]/FinancialNewsSentimentClassifier_DistilBERT",
tokenizer="distilbert-base-uncased"
)
# Example usage
result = classifier("Tesla stock surges 5% on better-than-expected Q4 earnings and new China factory plans.")
print(result)
# Expected output: [{'label': 'Bullish', 'score': 0.98...}]