Views
No views yet
1from transformers import pipeline
2
3# Load the model from the Hugging Face Hub
4ner_pipeline = pipeline("ner", model="Beehzod/smart-finetuned-ner")
5
6# Example predictions
7text = "Hugging Face Inc. is based in New York City, and its CEO is Clement Delangue."
8results = ner_pipeline(text)
9
10for entity in results:
11 print(f"Entity: {entity['word']}, Label: {entity['entity']}, Score: {entity['score']:.4f}")