Demo Code

#2
by dbertolino-huggingface - opened

Hi nickprock, can you share the code of the huggingface API?

Hi @dbertolino-huggingface ,

if I understand correctly you want the code to test the model. If you click on "Use in Transformers" a popup opens with the code.
If you want to use the pipeline try the code below.

from transformers import pipeline
ner_pipeline = pipeline("ner", model="nickprock/bert-italian-finetuned-ner", aggregation_strategy="simple")
text = "La sede storica della Olivetti è ad Ivrea"
output = ner_pipeline(text)
nickprock changed discussion status to closed

Sign up or log in to comment