Text Classification
Transformers
PyTorch
Dutch
bert
text classification
sentiment analysis
domain adaptation
text-embeddings-inference
Instructions to use clips/republic with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use clips/republic with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="clips/republic")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("clips/republic") model = AutoModelForSequenceClassification.from_pretrained("clips/republic", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Commit ·
ffd5e25
1
Parent(s): d36cdbb
Update README.md
Browse files
README.md
CHANGED
|
@@ -12,7 +12,8 @@ The model can be loaded and used to make predictions as follows:
|
|
| 12 |
```
|
| 13 |
from transformers import pipeline
|
| 14 |
model_path = 'clips/republic'
|
| 15 |
-
pipe = pipeline(task="text-classification",
|
|
|
|
| 16 |
text = … # load your text here
|
| 17 |
output = pipe(text)
|
| 18 |
prediction = output[0]['label'] # 0=”neutral”; 1=”positive”; 2=”negative”
|
|
|
|
| 12 |
```
|
| 13 |
from transformers import pipeline
|
| 14 |
model_path = 'clips/republic'
|
| 15 |
+
pipe = pipeline(task="text-classification",
|
| 16 |
+
model=model_path, tokenizer=model_path)
|
| 17 |
text = … # load your text here
|
| 18 |
output = pipe(text)
|
| 19 |
prediction = output[0]['label'] # 0=”neutral”; 1=”positive”; 2=”negative”
|