alwanadi17 commited on
Commit
1708496
·
verified ·
1 Parent(s): 05f8d28

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +3 -3
README.md CHANGED
@@ -66,12 +66,12 @@ pip install transformers torch
66
 
67
  ### Load Model and Tokenizer
68
  ```
69
- from transformers import DistilBertForSequenceClassification, DistilBertTokenizer
70
 
71
  # Load model and tokenizer
72
  model_name = "distilbert-base-q-cat"
73
- model = DistilBertForSequenceClassification.from_pretrained(model_name)
74
- tokenizer = DistilBertTokenizer.from_pretrained(model_name)
75
  ```
76
 
77
  ### Inference Example
 
66
 
67
  ### Load Model and Tokenizer
68
  ```
69
+ from transformers import AutoTokenizer, AutoModelForSequenceClassification
70
 
71
  # Load model and tokenizer
72
  model_name = "distilbert-base-q-cat"
73
+ model = AutoModelForSequenceClassification.from_pretrained(model_name, num_labels=3, ignore_mismatched_sizes=True)
74
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
75
  ```
76
 
77
  ### Inference Example