ugursa/Yahoo-Finance-News-Sentences
Viewer • Updated • 25k • 53 • 16
How to use ugursa/FinancialBERT-Yahoo-Finance-Sentiment-Analysis with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="ugursa/FinancialBERT-Yahoo-Finance-Sentiment-Analysis") # Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("ugursa/FinancialBERT-Yahoo-Finance-Sentiment-Analysis")
model = AutoModelForSequenceClassification.from_pretrained("ugursa/FinancialBERT-Yahoo-Finance-Sentiment-Analysis")