brjoey commited on
Commit
fa9d82a
·
verified ·
1 Parent(s): 5f69ba6

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +5 -1
README.md CHANGED
@@ -11,7 +11,11 @@ model_name = "brjoey/climatebert_econbert"
11
  tokenizer = AutoTokenizer.from_pretrained(model_name)
12
  model = AutoModel.from_pretrained(model_name)
13
 
14
- # or load the model directly with
 
 
 
 
15
  from transformers import AutoModelForSequenceClassification
16
  model = AutoModelForSequenceClassification.from_pretrained(model_name, num_labels=3)
17
  ```
 
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
  ```