Instructions to use neZorinEgor/recipe_ner_model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use neZorinEgor/recipe_ner_model with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="neZorinEgor/recipe_ner_model")# Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("neZorinEgor/recipe_ner_model") model = AutoModelForTokenClassification.from_pretrained("neZorinEgor/recipe_ner_model", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Recipe ner model
from transformers import pipeline
ner_pipeline = pipeline(
"token-classification",
model="neZorinEgor/recipe_ner_model",
)
test_recipes = [
"2 cups flour 1/2 teaspoon salt",
"3 tablespoons olive oil 2 cloves garlic minced",
"1 pound beef brisket 1 onion chopped",
]
for t in test_recipes:
print("-"*50)
print(ner_pipeline(t))
- Loss: 0.2891
- Accuracy: 0.9102
- F1: 0.9000
- Classification Report: precision recall f1-score support
COMMENT 0.76 0.78 0.77 6934
INDEX 0.00 0.00 0.00 2
NAME 0.88 0.89 0.88 7773
QTY 0.99 0.99 0.99 6416
RANGE_END 0.96 0.97 0.97 110
UNIT 0.99 0.99 0.99 5428
micro avg 0.90 0.90 0.90 26663
macro avg 0.76 0.77 0.77 26663
weighted avg 0.90 0.90 0.90 26663
Framework versions
- Transformers 5.0.0
- Pytorch 2.10.0+cu128
- Datasets 4.0.0
- Tokenizers 0.22.2
- Downloads last month
- 2