Views
No views yet
1from transformers import AutoModelForSequenceClassification, AutoTokenizer, pipeline
2
3tokenizer_name = "extreme-weather-impacts/environmentalBERT-extremeweather"
4model_name = "extreme-weather-impacts/environmentalBERT-extremeweather"
5
6model = AutoModelForSequenceClassification.from_pretrained(model_name)
7tokenizer = AutoTokenizer.from_pretrained(tokenizer_name, max_len=512)
8
9pipe = pipeline("text-classification", model=model, tokenizer=tokenizer, device=0, top_k=None) # set device=0 to use GPU
10
11# See https://huggingface.co/docs/transformers/main_classes/pipelines#transformers.pipeline
12print(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))
13print(pipe("Hurricanes play a significant role in our yearly risk assessment.", padding=True, truncation=True))
14print(pipe("Droughts increase the risk of severe wildfires that can additionally damage our crops.", padding=True, truncation=True))1@article{Schimanski25extremeweatherimpacts,
2 title={{What Firms Actually Lose (and Gain) from Extreme Weather Event Impacts}},
3 author={Tobias Schimanski and Glen Gostlow and Malte Toetzke and Markus Leippold},
4 year={2025},
5 journal={Available at SSRN: https://ssrn.com/abstract=6035794},
6}