Token Classification
Transformers
PyTorch
English
distilbert
keyphrase-extraction
Eval Results (legacy)
Instructions to use ml6team/keyphrase-extraction-distilbert-inspec with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ml6team/keyphrase-extraction-distilbert-inspec with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="ml6team/keyphrase-extraction-distilbert-inspec")# Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("ml6team/keyphrase-extraction-distilbert-inspec") model = AutoModelForTokenClassification.from_pretrained("ml6team/keyphrase-extraction-distilbert-inspec") - Inference
- Notebooks
- Google Colab
- Kaggle
TypeError: postprocess() got an unexpected keyword argument 'model_outputs'
#2
by Rakshit-OSG - opened
Hi,
The name of the model outputs parameter seems to have changed in the postprocess function.
Now it is called all_outputs. Can you replace the postprocess function with this:
def postprocess(self, all_outputs):
results = super().postprocess(
all_outputs=all_outputs,
aggregation_strategy=AggregationStrategy.FIRST,
)
return np.unique([result.get("word").strip() for result in results])
I will also update the model documentation.
Thanks for noticing!
Thomas De Decker
DeDeckerThomas changed discussion status to closed


