Views
No views yet
ProsusAI/finbert. The model classifies financial text (like tweets or news headlines) into three categories: Bullish, Bearish, or Neutral.BertForSequenceClassification based on the ProsusAI/finbert architecture. It has been fine-tuned to predict the sentiment of financial text. The model was trained on a dataset of financial tweets and headlines, and it outputs one of three labels: Bullish, Bearish, or Neutral.1from transformers import pipeline, AutoTokenizer, AutoModelForSequenceClassification
2
3MODEL_PATH = "path to your model"
4
5tokenizer = AutoTokenizer.from_pretrained(MODEL_PATH)
6model = AutoModelForSequenceClassification.from_pretrained(MODEL_PATH)
7
8pipe = pipeline("text-classification", model=model, tokenizer=tokenizer)
9
10# Analyze sentiment
11results = pipe("Adobe price target raised to $350 vs. $320 at Canaccord")
12print(results)
13# [{'label': 'Bullish', 'score': 0.9...}]data_preprocessing.py) which includes: