Create README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
+
license: mit
|
| 16 |
+
---
|
| 17 |
+
# InstaFoodBERT
|
| 18 |
+
|
| 19 |
+
## Model description
|
| 20 |
+
|
| 21 |
+
**InstaFoodBERT** is a fine-tuned BERT model that is ready to use for **Named Entity Recognition** of Food entities on informal text (like social media). It has been trained to recognize a single entity: food (FOOD).
|
| 22 |
+
|
| 23 |
+
Specifically, this model is a *bert-base-cased* 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.
|
| 24 |
+
|
| 25 |
+
|
| 26 |
+
## Intended uses
|
| 27 |
+
|
| 28 |
+
#### How to use
|
| 29 |
+
|
| 30 |
+
You can use this model with Transformers *pipeline* for NER.
|
| 31 |
+
|
| 32 |
+
```python
|
| 33 |
+
from transformers import AutoTokenizer, AutoModelForTokenClassification
|
| 34 |
+
from transformers import pipeline
|
| 35 |
+
|
| 36 |
+
tokenizer = AutoTokenizer.from_pretrained("Dizex/InstaFoodBERT")
|
| 37 |
+
model = AutoModelForTokenClassification.from_pretrained("Dizex/InstaFoodBERT")
|
| 38 |
+
|
| 39 |
+
pipe = pipeline("ner", model=model, tokenizer=tokenizer)
|
| 40 |
+
example = "Today's meal: Fresh olive poké bowl topped with chia seeds. Very delicious!"
|
| 41 |
+
|
| 42 |
+
ner_entity_results = pipe(example)
|
| 43 |
+
print(ner_entity_results)
|
| 44 |
+
```
|