Edit model card

Model Card for Model ID carolanderson/roberta-base-food-ner

Model Details

Model Description

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.

  • Developed by: Carol Anderson
  • Shared by: Carol Anderson
  • Language(s) (NLP): English
  • License: MIT
  • Finetuned from model: roberta-base

Model Sources

How to Get Started with the Model

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")
Downloads last month
61
Inference Examples
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social visibility and check back later, or deploy to Inference Endpoints (dedicated) instead.

Space using carolanderson/roberta-base-food-ner 1