baskra/leaf-base
019
1---2library_name: transformers3tags:4 - food5 - environment6 - NLP7 - Eco-Score8 - products9 - multilingual10 - BERT11 - classification12 - Open Food Facts13 - climate14license: mit15datasets:16 - baskra/LEAF17---18 19# LEAF: Predicting the Environmental Impact of Food Products based on their Name20 21The `leaf-base` model is22a [`distiluse-base-multilingual-cased-v2`](https://huggingface.co/sentence-transformers/distiluse-base-multilingual-cased-v2)23model fine-tuned on the [LEAF dataset](https://huggingface.co/datasets/baskra/LEAF).24 25To load the model, use the following code:26 27```python28from transformers import AutoTokenizer, AutoModel29 30tokenizer = AutoTokenizer.from_pretrained("baskra/leaf-base")31model = AutoModel.from_pretrained("baskra/leaf-base", trust_remote_code=True)32 33model(**tokenizer("Nutella", return_tensors="pt"))34# {'logits': tensor([[-11.9081, ...]]), 'class_idx': tensor([1553]), 'ef_score': tensor([0.0129]), 'class': ['Chocolate spread with hazelnuts']}35```36 37## Citation38 39When using this model, please consider citing it as follows:40 41**BibTeX:**42 43```bibtex44@inproceedings{krahmer-2024-leaf,45 title = "{LEAF}: Predicting the Environmental Impact of Food Products based on their Name",46 author = "Krahmer, Bas",47 editor = "Stammbach, Dominik and48 Ni, Jingwei and49 Schimanski, Tobias and50 Dutia, Kalyan and51 Singh, Alok and52 Bingler, Julia and53 Christiaen, Christophe and54 Kushwaha, Neetu and55 Muccione, Veruska and56 A. Vaghefi, Saeid and57 Leippold, Markus",58 booktitle = "Proceedings of the 1st Workshop on Natural Language Processing Meets Climate Change (ClimateNLP 2024)",59 month = aug,60 year = "2024",61 address = "Bangkok, Thailand",62 publisher = "Association for Computational Linguistics",63 url = "https://aclanthology.org/2024.climatenlp-1.10",64 pages = "133--142",65 abstract = "Although food consumption represents a sub- stantial global source of greenhouse gas emis- sions, assessing the environmental impact of off-the-shelf products remains challenging. Currently, this information is often unavailable, hindering informed consumer decisions when grocery shopping. The present work introduces a new set of models called LEAF, which stands for Linguistic Environmental Analysis of Food Products. LEAF models predict the life-cycle environmental impact of food products based on their name. It is shown that LEAF models can accurately predict the environmental im- pact based on just the product name in a multi- lingual setting, greatly outperforming zero-shot classification methods. Models of varying sizes and capabilities are released, along with the code and dataset to fully reproduce the study.",66}67```68 69 