Instructions to use Forturne/Finbert_PB with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Forturne/Finbert_PB with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="Forturne/Finbert_PB")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("Forturne/Finbert_PB") model = AutoModelForSequenceClassification.from_pretrained("Forturne/Finbert_PB") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -3,8 +3,8 @@ You can use this model with Transformers pipeline for sentiment analysis.
|
|
| 3 |
from transformers import BertTokenizer, BertForSequenceClassification
|
| 4 |
from transformers import pipeline
|
| 5 |
|
| 6 |
-
finbert = BertForSequenceClassification.from_pretrained('
|
| 7 |
-
tokenizer = BertTokenizer.from_pretrained('
|
| 8 |
|
| 9 |
nlp = pipeline("sentiment-analysis", model=finbert, tokenizer=tokenizer)
|
| 10 |
|
|
|
|
| 3 |
from transformers import BertTokenizer, BertForSequenceClassification
|
| 4 |
from transformers import pipeline
|
| 5 |
|
| 6 |
+
finbert = BertForSequenceClassification.from_pretrained('Forturne/Finbert_PB',num_labels=3)
|
| 7 |
+
tokenizer = BertTokenizer.from_pretrained('Forturne/Finbert_PB')
|
| 8 |
|
| 9 |
nlp = pipeline("sentiment-analysis", model=finbert, tokenizer=tokenizer)
|
| 10 |
|