Downloads · 30 days
48
1% of all-time downloads
carolanderson/roberta-base-food-ner
roberta-base-food-ner is a token classification model from carolanderson. Use it when you need labels on individual words, such as names. It is set up for transformers. The card lists the license as mit.
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.. Achieves an F1 score 0f 0.96 on the cus…
Downloads · 30 days
48
1% of all-time downloads
All-time downloads
6.7K
Public
Repo size
993 MB
Likes
2
Public
Click a slice to open those files.
.bin496 MB · 99%
From the Hugging Face model README
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.. Achieves an F1 score 0f 0.96 on the custom validation set.
Use the code below to get started with the model.
from transformers import AutoTokenizer, AutoModelForTokenClassification, pipeline
model = AutoModelForTokenClassification.from_pretrained('carolanderson/roberta-base-food-ner')
tokenizer = AutoTokenizer.from_pretrained("roberta-base", add_prefix_space=True)
nlp = pipeline("ner", model=model, tokenizer=tokenizer)
example = "Saute the onions in olive oil until browned."
results = nlp(example, aggregation_strategy="first")