Token Classification
Transformers
Safetensors
English
Chinese
deberta-v2
aspect-based-sentiment-analysis
sentiment-analysis
sequence-labeling
deberta
Instructions to use yangheng/deberta-v3-base-end2end-absa with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use yangheng/deberta-v3-base-end2end-absa with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="yangheng/deberta-v3-base-end2end-absa")# Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("yangheng/deberta-v3-base-end2end-absa") model = AutoModelForTokenClassification.from_pretrained("yangheng/deberta-v3-base-end2end-absa") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -32,7 +32,7 @@ from transformers import pipeline
|
|
| 32 |
|
| 33 |
nlp = pipeline(
|
| 34 |
"token-classification",
|
| 35 |
-
model="
|
| 36 |
aggregation_strategy="simple", # aggregates sub-tokens into word-level entities
|
| 37 |
)
|
| 38 |
|
|
@@ -84,8 +84,8 @@ print(aspects)
|
|
| 84 |
You can deploy a simple REST service using FastAPI:
|
| 85 |
|
| 86 |
```bash
|
| 87 |
-
|
| 88 |
-
python
|
| 89 |
```
|
| 90 |
|
| 91 |
Predict:
|
|
|
|
| 32 |
|
| 33 |
nlp = pipeline(
|
| 34 |
"token-classification",
|
| 35 |
+
model="yangheng/deberta-v3-base-end2end-absa", # replace with your repo id
|
| 36 |
aggregation_strategy="simple", # aggregates sub-tokens into word-level entities
|
| 37 |
)
|
| 38 |
|
|
|
|
| 84 |
You can deploy a simple REST service using FastAPI:
|
| 85 |
|
| 86 |
```bash
|
| 87 |
+
|
| 88 |
+
python serve_singlehead_api.py --model yangheng/deberta-v3-base-end2end-absa --host 0.0.0.0 --port 8000
|
| 89 |
```
|
| 90 |
|
| 91 |
Predict:
|