carolanderson
commited on
Commit
•
b6878f8
1
Parent(s):
c82848e
Update README.md
Browse files
README.md
CHANGED
@@ -3,4 +3,33 @@ license: mit
|
|
3 |
language:
|
4 |
- en
|
5 |
library_name: transformers
|
6 |
-
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
language:
|
4 |
- en
|
5 |
library_name: transformers
|
6 |
+
---
|
7 |
+
# Model Card for Model ID carolanderson/roberta-base-food-ner
|
8 |
+
|
9 |
+
## Model Details
|
10 |
+
### Model Description
|
11 |
+
Model for tagging mentions of food in the text of recipes. Trained by fine tuning RoBERTa base on a set of about 300 hand-labeled recipes derived from [this dataset from Kaggle.](https://www.kaggle.com/hugodarwood/epirecipes). Achieves an F1 score 0f 0.96 on the custom validation set.
|
12 |
+
|
13 |
+
- **Developed by:** Carol Anderson
|
14 |
+
- **Shared by:** Carol Anderson
|
15 |
+
- **Language(s) (NLP):** English
|
16 |
+
- **License:** MIT
|
17 |
+
- **Finetuned from model:** [roberta-base](https://huggingface.co/roberta-base)
|
18 |
+
|
19 |
+
### Model Sources
|
20 |
+
- **Repository:** [carolmanderson/food](https://github.com/carolmanderson/food/tree/master)
|
21 |
+
- **Demo:** [food-ner](https://huggingface.co/spaces/carolanderson/food-ner)
|
22 |
+
|
23 |
+
## How to Get Started with the Model
|
24 |
+
|
25 |
+
Use the code below to get started with the model.
|
26 |
+
|
27 |
+
```
|
28 |
+
from transformers import AutoTokenizer, AutoModelForTokenClassification, pipeline
|
29 |
+
model = AutoModelForTokenClassification.from_pretrained('carolanderson/roberta-base-food-ner')
|
30 |
+
tokenizer = AutoTokenizer.from_pretrained("roberta-base", add_prefix_space=True)
|
31 |
+
nlp = pipeline("ner", model=model, tokenizer=tokenizer)
|
32 |
+
example = "Saute the onions in olive oil until browned."
|
33 |
+
results = nlp(example, aggregation_strategy="first")
|
34 |
+
|
35 |
+
```
|