PII detection using en_spacy_pii_distilbert model from Hugging face

Hi, I am trying to load model: beki/en_spacy_pii_distilbert for PII detection purpose, But I am getting error: beki/en_spacy_pii_distilbert does not appear to have a file named config.json
Its repository also does not have config.json file, it has config.cnf file that doesn’t seem to have transformer configuration. I am using following lines of code:

from transformers import pipeline, AutoModel,AutoTokenizer, AutoConfig 
import en_spacy_pii_distilbert
pretrained_checkpoint = "beki/en_spacy_pii_distilbert"
tokenizer = AutoTokenizer.from_pretrained(pretrained_checkpoint)
model = AutoModel.from_pretrained(pretrained_checkpoint)

classifier = pipeline("ner", model = model, tokenizer=tokenizer)
result = classifier("Hello I'm Omar and I live in Zürich.")

Am I missing something?

Hello, @dmurge!

Any news about this issue? I’m facing the same problem.

You might want to have a look at the app.py and spacy_recognizer.py here. I managed to cobble together a working inference pipeline from that.