empathyai/grocery-ner-dataset
Viewer • Updated • 1.06k • 11
How to use empathyai/gliner_large-v2.5-groceries with GLiNER:
from gliner import GLiNER
model = GLiNER.from_pretrained("empathyai/gliner_large-v2.5-groceries")IMPORTANT NOTE: Starting May 20th, all models from empathyai organization will require access request. Please ensure your authentication credentials are properly configured to avoid service interruptions.
A fine-tuned GLiNER model for identifying grocery items and food categories in text.
Take a look here and try the model in action!
This model is fine-tuned on the grocery-ner-dataset to identify 14 different categories of grocery items including fruits, vegetables, dairy products, and more.
!pip install gliner
from gliner import GLiNER
# Load model
model = GLiNER.from_pretrained("empathyai/gliner_large-v2.5-groceries")
labels = [
"Fruits Vegetables",
"Lactose, Diary, Eggs, Cheese, Yoghurt",
"Meat, Fish, Seafood",
"Frozen, Prepared Meals",
"Baking, Cooking",
"Cereals, Grains, Canned, Seeds",
"Breads",
"Snacks, Pastries, Treats",
"Frozen Desserts",
"Hot Drinks, Chilled Drinks",
"Alcoholic Drinks",
"Spices, Sauces",
"World Foods",
"Dietary Restrictions, Health, Allergens, Lifestyle"
]
# Example text
text = "I need to buy milk, bread, and fresh apples"
# Get predictions
predictions = model.predict_entities(text, labels=labels)
print(predictions)
Base model
gliner-community/gliner_large-v2.5