Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,26 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# FinBERT-FOMC
|
| 2 |
+
FinBERT-FOMC is a FinBERT model fine-tuned on the data used FOMC minutes 2006.1 to 2023.2 with 3535 relabel complex sentences.
|
| 3 |
+
**Input:**
|
| 4 |
+
A financial text.
|
| 5 |
+
|
| 6 |
+
**Output:**
|
| 7 |
+
Positive, Negative, Neutral
|
| 8 |
+
|
| 9 |
+
# How to use
|
| 10 |
+
You can use this model with Transformers pipeline for FinBERT-FOMC.
|
| 11 |
+
|
| 12 |
+
```bash
|
| 13 |
+
from transformers import BertTokenizer, BertForSequenceClassification, pipeline
|
| 14 |
+
|
| 15 |
+
finbert = BertForSequenceClassification.from_pretrained('ZiweiChen/FinBERT-FOMC',num_labels=3)
|
| 16 |
+
tokenizer = BertTokenizer.from_pretrained('ZiweiChen/FinBERT-FOMC')
|
| 17 |
+
finbert_fomc = pipeline("text-classification", model=finbert, tokenizer=tokenizer)
|
| 18 |
+
|
| 19 |
+
sentences = ["Spending on cars and light trucks increased somewhat in July after a lackluster pace in the second quarter but apparently weakened in August"]
|
| 20 |
+
results = finbert_fomc(sentences)
|
| 21 |
+
print(results)
|
| 22 |
+
# [{'label': 'Negative', 'score': 0.994509756565094}]
|
| 23 |
+
|
| 24 |
+
```
|
| 25 |
+
Visit https://github.com/Incredible88/FinBERT-FOMC for more details
|
| 26 |
+
|