Update README.md
Browse files
README.md
CHANGED
@@ -25,9 +25,15 @@ To use this model, you'll need to install the Hugging Face Transformers library
|
|
25 |
pip install transformers
|
26 |
pip install torch
|
27 |
|
28 |
-
|
29 |
-
|
30 |
You can easily load the pre-trained model for sentiment analysis using Hugging Face's DistilBertForSequenceClassification and DistilBertTokenizerFast.
|
31 |
-
|
32 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
|
|
|
25 |
pip install transformers
|
26 |
pip install torch
|
27 |
|
28 |
+
Usage
|
|
|
29 |
You can easily load the pre-trained model for sentiment analysis using Hugging Face's DistilBertForSequenceClassification and DistilBertTokenizerFast.
|
30 |
+
|
31 |
+
python
|
32 |
+
Copy code
|
33 |
+
from transformers import DistilBertForSequenceClassification, DistilBertTokenizerFast
|
34 |
+
import torch
|
35 |
+
|
36 |
+
model_name = "ongaunjie/distilbert-cloths-sentiment"
|
37 |
+
tokenizer = DistilBertTokenizerFast.from_pretrained(model_name)
|
38 |
+
model = DistilBertForSequenceClassification.from_pretrained(model_name)
|
39 |
|