Token Classification
Transformers
PyTorch
English
roberta
keyphrase-extraction
Eval Results (legacy)
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") - Inference
- Notebooks
- Google Colab
- Kaggle
Commit ·
9aec2f2
1
Parent(s): 4f8e3db
Update README.md
Browse files
README.md
CHANGED
|
@@ -58,6 +58,14 @@ Sahrawat, Dhruva, Debanjan Mahata, Haimin Zhang, Mayank Kulkarni, Agniv Sharma,
|
|
| 58 |
|
| 59 |
### ❓ How to use
|
| 60 |
```python
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 61 |
# Define keyphrase extraction pipeline
|
| 62 |
class KeyphraseExtractionPipeline(TokenClassificationPipeline):
|
| 63 |
def __init__(self, model, *args, **kwargs):
|
|
|
|
| 58 |
|
| 59 |
### ❓ How to use
|
| 60 |
```python
|
| 61 |
+
from transformers import (
|
| 62 |
+
TokenClassificationPipeline,
|
| 63 |
+
AutoModelForTokenClassification,
|
| 64 |
+
AutoTokenizer,
|
| 65 |
+
)
|
| 66 |
+
from transformers.pipelines import AggregationStrategy
|
| 67 |
+
import numpy as np
|
| 68 |
+
|
| 69 |
# Define keyphrase extraction pipeline
|
| 70 |
class KeyphraseExtractionPipeline(TokenClassificationPipeline):
|
| 71 |
def __init__(self, model, *args, **kwargs):
|