Dizex/InstaFoodSet
Viewer • Updated • 400 • 18
Run Dizex/InstaFoodBERT-NER on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Use HF Jobs to fine-tune https://huggingface.co/Dizex/InstaFoodBERT-NER. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Use HF Jobs to run batch inference with https://huggingface.co/Dizex/InstaFoodBERT-NER on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
How to use Dizex/InstaFoodBERT-NER with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("token-classification", model="Dizex/InstaFoodBERT-NER") # pip install -U transformers accelerate
# Load model directly
from transformers import AutoTokenizer, AutoModelForTokenClassification
tokenizer = AutoTokenizer.from_pretrained("Dizex/InstaFoodBERT-NER")
model = AutoModelForTokenClassification.from_pretrained("Dizex/InstaFoodBERT-NER", device_map="auto")InstaFoodBERT-NER is a fine-tuned BERT model that is ready to use for Named Entity Recognition of Food entities on informal text (social media like). It has been trained to recognize a single entity: food (FOOD).
Specifically, this model is a bert-base-cased model that was fine-tuned on a dataset consisting of 400 English Instagram posts related to food. The dataset is open source.
You can use this model with Transformers pipeline for NER.
from transformers import AutoTokenizer, AutoModelForTokenClassification
from transformers import pipeline
tokenizer = AutoTokenizer.from_pretrained("Dizex/InstaFoodBERT-NER")
model = AutoModelForTokenClassification.from_pretrained("Dizex/InstaFoodBERT-NER")
pipe = pipeline("ner", model=model, tokenizer=tokenizer)
example = "Today's meal: Fresh olive poké bowl topped with chia seeds. Very delicious!"
ner_entity_results = pipe(example)
print(ner_entity_results)