Text Classification
Transformers
PyTorch
English
roberta
ESG
environmental
text-embeddings-inference
Instructions to use ESGBERT/EnvRoBERTa-environmental with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ESGBERT/EnvRoBERTa-environmental with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="ESGBERT/EnvRoBERTa-environmental")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("ESGBERT/EnvRoBERTa-environmental") model = AutoModelForSequenceClassification.from_pretrained("ESGBERT/EnvRoBERTa-environmental", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Commit ·
6cd314d
1
Parent(s): 1ac635e
Update README.md
Browse files
README.md
CHANGED
|
@@ -33,7 +33,7 @@ tokenizer = AutoTokenizer.from_pretrained(tokenizer_name, max_len=512)
|
|
| 33 |
pipe = pipeline("text-classification", model=model, tokenizer=tokenizer) # set device=0 to use GPU
|
| 34 |
|
| 35 |
# See https://huggingface.co/docs/transformers/main_classes/pipelines#transformers.pipeline
|
| 36 |
-
print(pipe("Scope 1 emissions are reported here on a like-for-like basis against the 2013 baseline and exclude emissions from additional vehicles used during repairs."
|
| 37 |
```
|
| 38 |
|
| 39 |
## More details can be found in the paper
|
|
|
|
| 33 |
pipe = pipeline("text-classification", model=model, tokenizer=tokenizer) # set device=0 to use GPU
|
| 34 |
|
| 35 |
# See https://huggingface.co/docs/transformers/main_classes/pipelines#transformers.pipeline
|
| 36 |
+
print(pipe("Scope 1 emissions are reported here on a like-for-like basis against the 2013 baseline and exclude emissions from additional vehicles used during repairs.", padding=True, truncation=True))
|
| 37 |
```
|
| 38 |
|
| 39 |
## More details can be found in the paper
|