Instructions to use ml6team/keyphrase-extraction-kbir-inspec with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ml6team/keyphrase-extraction-kbir-inspec with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="ml6team/keyphrase-extraction-kbir-inspec")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("ml6team/keyphrase-extraction-kbir-inspec") model = AutoModelForTokenClassification.from_pretrained("ml6team/keyphrase-extraction-kbir-inspec", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Error please help
TokenClassificationPipeline.postprocess() got an unexpected keyword argument 'model_outputs'
Its giving this error .. please help
Changing Parametername 'model_outputs' to 'all_outputs' worked for me.
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 @bengelmann !
Thomas De Decker