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")# pip install -U transformers accelerate # 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", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -186,7 +186,7 @@ with torch.no_grad():
|
|
| 186 |
# Apply sigmoid to the logits to get probabilities
|
| 187 |
probabilities = torch.sigmoid(outputs.logits).squeeze()
|
| 188 |
|
| 189 |
-
# Determine a threshold for predicting labels
|
| 190 |
threshold = 0.5
|
| 191 |
predicted_label_indices = (probabilities > threshold).nonzero(as_tuple=True)[0]
|
| 192 |
|
|
|
|
| 186 |
# Apply sigmoid to the logits to get probabilities
|
| 187 |
probabilities = torch.sigmoid(outputs.logits).squeeze()
|
| 188 |
|
| 189 |
+
# Determine a threshold for predicting labels
|
| 190 |
threshold = 0.5
|
| 191 |
predicted_label_indices = (probabilities > threshold).nonzero(as_tuple=True)[0]
|
| 192 |
|