brjoey commited on
Commit
91206d8
·
verified ·
1 Parent(s): fa9d82a

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +3 -5
README.md CHANGED
@@ -9,13 +9,11 @@ from transformers import AutoTokenizer, AutoModel
9
 
10
  model_name = "brjoey/climatebert_econbert"
11
  tokenizer = AutoTokenizer.from_pretrained(model_name)
12
- model = AutoModel.from_pretrained(model_name)
13
 
14
- # Load the model directly with
15
- from transformers import AutoModel
16
- model = AutoModel.from_pretrained("brjoey/climatebert_econbert", torch_dtype="auto")
17
 
18
- # For sequence classification
19
  from transformers import AutoModelForSequenceClassification
20
  model = AutoModelForSequenceClassification.from_pretrained(model_name, num_labels=3)
21
  ```
 
9
 
10
  model_name = "brjoey/climatebert_econbert"
11
  tokenizer = AutoTokenizer.from_pretrained(model_name)
 
12
 
13
+ # Load the base model
14
+ model = AutoModel.from_pretrained(model_name, torch_dtype="auto")
 
15
 
16
+ # For sequence classification tasks
17
  from transformers import AutoModelForSequenceClassification
18
  model = AutoModelForSequenceClassification.from_pretrained(model_name, num_labels=3)
19
  ```