Text Classification
Transformers
Joblib
Safetensors
bert
sentiment-analysis
finance
macroeconomics
climate
esg
policy
ensemble
dictionary
finbert
Eval Results (legacy)
text-embeddings-inference
Instructions to use peyterho/macro-sentiment-finbert with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use peyterho/macro-sentiment-finbert with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="peyterho/macro-sentiment-finbert")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("peyterho/macro-sentiment-finbert") model = AutoModelForSequenceClassification.from_pretrained("peyterho/macro-sentiment-finbert", device_map="auto") - Notebooks
- Google Colab
- Kaggle
| # Macroeconomic Sentiment Analysis Pipeline | |
| # Multi-head transformer ensemble + dictionary signals | |
| from macro_sentiment.pipeline import MacroSentimentPipeline, MacroSentimentResult | |
| from macro_sentiment.dictionaries import ( | |
| CombinedDictionaryScorer, | |
| LoughranMcDonaldScorer, | |
| HenryScorer, | |
| ClimateExposureScorer, | |
| MacroDictionaryScorer, | |
| ) | |
| from macro_sentiment.transformers_ensemble import ( | |
| TransformerEnsemble, | |
| FinBERTHead, | |
| FinancialRoBERTaHead, | |
| ClimateBERTHead, | |
| MultilingualHead, | |
| TopicRouter, | |
| DEFAULT_FINBERT, | |
| DEFAULT_ROBERTA, | |
| DEFAULT_CLIMATEBERT, | |
| DEFAULT_MULTILINGUAL, | |
| ORIGINAL_FINBERT, | |
| ORIGINAL_ROBERTA, | |
| ORIGINAL_CLIMATEBERT, | |
| ) | |
| __version__ = "0.3.0" | |