Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language: en
|
3 |
+
datasets:
|
4 |
+
- Dizex/InstaFoodSet
|
5 |
+
widget:
|
6 |
+
- text: "Today's meal: Fresh olive poké bowl topped with chia seeds. Very delicious!"
|
7 |
+
example_title: "Food example 1"
|
8 |
+
- text: "Tartufo Pasta with garlic flavoured butter and olive oil, egg yolk, parmigiano and pasta water."
|
9 |
+
example_title: "Food example 2"
|
10 |
+
tags:
|
11 |
+
- Instagram
|
12 |
+
- NER
|
13 |
+
- Named Entity Recognition
|
14 |
+
- Food Entity Extraction
|
15 |
+
- Social Media
|
16 |
+
- Informal text
|
17 |
+
- RoBERTa
|
18 |
+
license: mit
|
19 |
+
---
|
20 |
+
# InstaFoodRoBERTa-NER
|
21 |
+
|
22 |
+
## Model description
|
23 |
+
|
24 |
+
**InstaFoodRoBERTa-NER** is a fine-tuned BERT model that is ready to use for **Named Entity Recognition** of Food entities on informal text (social media like). It has been trained to recognize a single entity: food (FOOD).
|
25 |
+
|
26 |
+
Specifically, this model is a *roberta-base* model that was fine-tuned on a dataset consisting of 400 English Instagram posts related to food. The [dataset](https://huggingface.co/datasets/Dizex/InstaFoodSet) is open source.
|
27 |
+
|
28 |
+
|
29 |
+
## Intended uses
|
30 |
+
|
31 |
+
#### How to use
|
32 |
+
|
33 |
+
You can use this model with Transformers *pipeline* for NER.
|
34 |
+
|
35 |
+
```python
|
36 |
+
from transformers import AutoTokenizer, AutoModelForTokenClassification
|
37 |
+
from transformers import pipeline
|
38 |
+
|
39 |
+
tokenizer = AutoTokenizer.from_pretrained("Dizex/InstaFoodRoBERTa-NER")
|
40 |
+
model = AutoModelForTokenClassification.from_pretrained("Dizex/InstaFoodRoBERTa-NER")
|
41 |
+
|
42 |
+
pipe = pipeline("ner", model=model, tokenizer=tokenizer)
|
43 |
+
example = "Today's meal: Fresh olive poké bowl topped with chia seeds. Very delicious!"
|
44 |
+
|
45 |
+
ner_entity_results = pipe(example)
|
46 |
+
print(ner_entity_results)
|
47 |
+
```
|
48 |
+
|
49 |
+
## Performance on [InstaFoodSet](https://huggingface.co/datasets/Dizex/InstaFoodSet)
|
50 |
+
metric|val
|
51 |
+
-|-
|
52 |
+
f1 |0.91
|
53 |
+
precision |0.89
|
54 |
+
recall |0.93
|
55 |
+
|