Instructions to use brjoey/climatebert_econbert with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use brjoey/climatebert_econbert with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="brjoey/climatebert_econbert")# Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("brjoey/climatebert_econbert") model = AutoModel.from_pretrained("brjoey/climatebert_econbert", device_map="auto") - Notebooks
- Google Colab
- Kaggle
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
|
| 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 |
```
|