eriktks/conll2003
Updated • 39.3k • 166
How to use Beehzod/smart-finetuned-ner with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="Beehzod/smart-finetuned-ner") # Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("Beehzod/smart-finetuned-ner")
model = AutoModelForSequenceClassification.from_pretrained("Beehzod/smart-finetuned-ner")This model is a fine-tuned version of DistilBERT for Named Entity Recognition (NER) tasks. It was trained on the CoNLL-2003 dataset, designed to identify entities such as persons, organizations, locations, and miscellaneous entities within English text.
The model was evaluated using the following metrics:
Here’s how to use this NER model with the Hugging Face Transformers library:
from transformers import pipeline
# Load the model from the Hugging Face Hub
ner_pipeline = pipeline("ner", model="Beehzod/smart-finetuned-ner")
# Example predictions
text = "Hugging Face Inc. is based in New York City, and its CEO is Clement Delangue."
results = ner_pipeline(text)
for entity in results:
print(f"Entity: {entity['word']}, Label: {entity['entity']}, Score: {entity['score']:.4f}")