Liqs commited on
Commit
6a50985
1 Parent(s): 4643665

Change loaded mode to correct on that this model card refers to

Browse files

Currently the base distilbert version that this sentiment analysis model is based on is loaded in the model card. New users that want to try this model out will get random results for sentiment analysis, because the base version is not fine tuned for this task.

Files changed (1) hide show
  1. README.md +2 -2
README.md CHANGED
@@ -141,8 +141,8 @@ Example of single-label classification:
141
  import torch
142
  from transformers import DistilBertTokenizer, DistilBertForSequenceClassification
143
 
144
- tokenizer = DistilBertTokenizer.from_pretrained("distilbert-base-uncased")
145
- model = DistilBertForSequenceClassification.from_pretrained("distilbert-base-uncased")
146
 
147
  inputs = tokenizer("Hello, my dog is cute", return_tensors="pt")
148
  with torch.no_grad():
 
141
  import torch
142
  from transformers import DistilBertTokenizer, DistilBertForSequenceClassification
143
 
144
+ tokenizer = DistilBertTokenizer.from_pretrained("distilbert-base-uncased-finetuned-sst-2-english")
145
+ model = DistilBertForSequenceClassification.from_pretrained("distilbert-base-uncased-finetuned-sst-2-english")
146
 
147
  inputs = tokenizer("Hello, my dog is cute", return_tensors="pt")
148
  with torch.no_grad():