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
Safetensors
Model size
10.1M params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support