Instructions to use TurkuNLP/web-register-classification-multilingual with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use TurkuNLP/web-register-classification-multilingual with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="TurkuNLP/web-register-classification-multilingual")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("TurkuNLP/web-register-classification-multilingual") model = AutoModelForSequenceClassification.from_pretrained("TurkuNLP/web-register-classification-multilingual") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -172,7 +172,7 @@ model_id = "TurkuNLP/multilingual-web-register-classification"
|
|
| 172 |
|
| 173 |
# Load model and tokenizer
|
| 174 |
model = AutoModelForSequenceClassification.from_pretrained(model_id).to(device)
|
| 175 |
-
tokenizer = AutoTokenizer.from_pretrained(
|
| 176 |
|
| 177 |
# Text to be categorized
|
| 178 |
text = "A text to be categorized"
|
|
|
|
| 172 |
|
| 173 |
# Load model and tokenizer
|
| 174 |
model = AutoModelForSequenceClassification.from_pretrained(model_id).to(device)
|
| 175 |
+
tokenizer = AutoTokenizer.from_pretrained("xlm-roberta-large")
|
| 176 |
|
| 177 |
# Text to be categorized
|
| 178 |
text = "A text to be categorized"
|