tobischimanski
commited on
Commit
•
a6523f2
1
Parent(s):
bd7544c
Update README.md
Browse files
README.md
CHANGED
@@ -29,7 +29,7 @@ model_name = "ESGBERT/EnvRoBERTa-environmental"
|
|
29 |
model = AutoModelForSequenceClassification.from_pretrained(model_name)
|
30 |
tokenizer = AutoTokenizer.from_pretrained(tokenizer_name, max_len=512)
|
31 |
|
32 |
-
pipe = pipeline("text-classification", model=model, tokenizer=tokenizer
|
33 |
|
34 |
# See https://huggingface.co/docs/transformers/main_classes/pipelines#transformers.pipeline
|
35 |
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."))
|
|
|
29 |
model = AutoModelForSequenceClassification.from_pretrained(model_name)
|
30 |
tokenizer = AutoTokenizer.from_pretrained(tokenizer_name, max_len=512)
|
31 |
|
32 |
+
pipe = pipeline("text-classification", model=model, tokenizer=tokenizer) # set device=0 to use GPU
|
33 |
|
34 |
# See https://huggingface.co/docs/transformers/main_classes/pipelines#transformers.pipeline
|
35 |
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."))
|