Text Classification
Transformers
Safetensors
distilbert
Generated from Trainer
text-embeddings-inference
Instructions to use ContextNews/news-classifier with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ContextNews/news-classifier with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="ContextNews/news-classifier")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("ContextNews/news-classifier") model = AutoModelForSequenceClassification.from_pretrained("ContextNews/news-classifier", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download thresholds.json from ContextNews/news-classifier: direct link, hf CLI and curl.
- Browser
- Download file 317 Bytes
-
https://huggingface.co/ContextNews/news-classifier/resolve/main/thresholds.json
- Command line
-
hf download hf://ContextNews/news-classifier/thresholds.json
-
curl -L -o thresholds.json https://huggingface.co/ContextNews/news-classifier/resolve/main/thresholds.json
317 Bytes
| { | |
| "politics": 0.38, | |
| "geopolitics": 0.5, | |
| "conflict": 0.32, | |
| "crime": 0.38, | |
| "law": 0.53, | |
| "business": 0.29, | |
| "economy": 0.27, | |
| "markets": 0.53, | |
| "technology": 0.34, | |
| "science": 0.14, | |
| "health": 0.3, | |
| "environment": 0.39, | |
| "society": 0.31, | |
| "education": 0.1, | |
| "sports": 0.2, | |
| "entertainment": 0.28 | |
| } | |