Instructions to use pritamdeb68/SentimentBERT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use pritamdeb68/SentimentBERT with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="pritamdeb68/SentimentBERT")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("pritamdeb68/SentimentBERT") model = AutoModelForSequenceClassification.from_pretrained("pritamdeb68/SentimentBERT") - Notebooks
- Google Colab
- Kaggle
Debopam Dey commited on
Update README.md
Browse files
README.md
CHANGED
|
@@ -39,7 +39,7 @@ from transformers import BertTokenizer, BertForSequenceClassification
|
|
| 39 |
|
| 40 |
# Load the model and tokenizer from the Hugging Face model hub
|
| 41 |
mymodel = BertForSequenceClassification.from_pretrained("pritam2014/SentimentBERT")
|
| 42 |
-
mytokenizer = BertTokenizer.from_pretrained("
|
| 43 |
```
|
| 44 |
```
|
| 45 |
def preprocess_text(text):
|
|
|
|
| 39 |
|
| 40 |
# Load the model and tokenizer from the Hugging Face model hub
|
| 41 |
mymodel = BertForSequenceClassification.from_pretrained("pritam2014/SentimentBERT")
|
| 42 |
+
mytokenizer = BertTokenizer.from_pretrained("pritam2014/SentimentBERT",use_auth_token=True)
|
| 43 |
```
|
| 44 |
```
|
| 45 |
def preprocess_text(text):
|