File size: 1,065 Bytes
f0c06da
 
941c13f
 
 
 
 
 
 
 
 
 
 
 
 
 
f0c06da
 
941c13f
f0c06da
941c13f
 
 
f0c06da
941c13f
f0c06da
941c13f
 
f0c06da
941c13f
 
f0c06da
941c13f
 
 
f0c06da
941c13f
f0c06da
941c13f
f0c06da
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
---
library_name: transformers
tags:
  - food
  - environment
  - NLP
  - Eco-Score
  - products
  - multilingual
  - BERT
  - classification
  - Open Food Facts
  - climate
license: mit
datasets:
  - baskra/LEAF
---

# LEAF: Predicting the Environmental Impact of Food Products based on their Name

The `leaf-large` model is
a [`BAAI/bge-m3`](https://huggingface.co/BAAI/bge-m3)
model fine-tuned on the [LEAF dataset](https://huggingface.co/datasets/baskra/LEAF).

To load the model, use the following code:

```python
from transformers import AutoTokenizer, AutoModel

tokenizer = AutoTokenizer.from_pretrained("baskra/leaf-base")
model = AutoModel.from_pretrained("baskra/leaf-base", trust_remote_code=True)

model(**tokenizer("Nutella", return_tensors="pt"))
# {'logits': tensor([[-12.2842, ...]]), 'class_idx': tensor([1553]), 'ef_score': tensor([0.0129]), 'class': ['Chocolate spread with hazelnuts']}
```

## Citation

When using this model, please consider citing it as follows:

**BibTeX:**

[More Information Needed]

**APA:**

[More Information Needed]