Update README.md
Browse files
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
|
| 15 |
-
|
| 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 |
```
|