ongaunjie commited on
Commit
3580d92
·
1 Parent(s): c85de7c

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +10 -4
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
- ##Usage
29
-
30
  You can easily load the pre-trained model for sentiment analysis using Hugging Face's DistilBertForSequenceClassification and DistilBertTokenizerFast.
31
- pip install transformers
32
- pip install torch
 
 
 
 
 
 
 
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