Text Classification
Transformers
Safetensors
multilingual
snt_classifier
feature-extraction
news
topic-classification
multi-label
xlm-roberta
custom_code
Instructions to use sweenk/snt-classifier with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use sweenk/snt-classifier with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="sweenk/snt-classifier", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("sweenk/snt-classifier", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
| { | |
| "architectures": [ | |
| "SNTForNewsClassification" | |
| ], | |
| "auto_map": { | |
| "AutoConfig": "modeling_snt.SNTConfig", | |
| "AutoModel": "modeling_snt.SNTForNewsClassification" | |
| }, | |
| "dropout": 0.1, | |
| "dtype": "float32", | |
| "encoder_name": "xlm-roberta-large", | |
| "l1_keys": [ | |
| "sports", | |
| "politics", | |
| "world", | |
| "entertainment_and_pop_culture", | |
| "money_and_business", | |
| "crime_and_justice", | |
| "tech_and_ai", | |
| "science_and_space", | |
| "health_and_wellness", | |
| "lifestyle", | |
| "weather_and_environment", | |
| "human_stories" | |
| ], | |
| "l1_thresholds": { | |
| "crime_and_justice": 0.95, | |
| "entertainment_and_pop_culture": 0.85, | |
| "health_and_wellness": 0.9, | |
| "human_stories": 0.9, | |
| "lifestyle": 0.7, | |
| "money_and_business": 0.95, | |
| "politics": 0.75, | |
| "science_and_space": 0.95, | |
| "sports": 0.85, | |
| "tech_and_ai": 0.95, | |
| "weather_and_environment": 0.95, | |
| "world": 0.85 | |
| }, | |
| "l2_keys": [ | |
| "soccer", | |
| "american_football", | |
| "college_sports", | |
| "basketball", | |
| "baseball", | |
| "hockey", | |
| "combat_sports", | |
| "motorsports", | |
| "tennis", | |
| "golf", | |
| "olympics", | |
| "other_sports", | |
| "elections_and_campaigns", | |
| "government_and_policy", | |
| "political_figures_and_scandals", | |
| "immigration_and_borders", | |
| "social_issues_and_activism", | |
| "state_and_local_politics", | |
| "war_and_conflict", | |
| "geopolitics_and_diplomacy", | |
| "terrorism_and_security", | |
| "humanitarian_crises", | |
| "celebrities_and_gossip", | |
| "movies_and_tv", | |
| "music", | |
| "gaming", | |
| "internet_culture_and_creators", | |
| "books_and_arts", | |
| "media_and_journalism", | |
| "cost_of_living", | |
| "personal_finance", | |
| "housing_and_real_estate", | |
| "work_and_careers", | |
| "markets_and_investing", | |
| "crypto_and_fintech", | |
| "companies_and_industries", | |
| "macro_economy_and_rates", | |
| "crime_and_policing", | |
| "courts_and_trials", | |
| "scams_and_fraud", | |
| "true_crime", | |
| "artificial_intelligence", | |
| "big_tech_and_startups", | |
| "gadgets_and_apps", | |
| "cybersecurity_and_privacy", | |
| "screen_time_and_digital_life", | |
| "space_and_astronomy", | |
| "scientific_discoveries", | |
| "psychology_and_behavior", | |
| "archaeology_and_history", | |
| "mental_health", | |
| "fitness_and_exercise", | |
| "nutrition_and_diet", | |
| "sleep_and_longevity", | |
| "medical_and_public_health", | |
| "food_and_drink", | |
| "travel_and_places", | |
| "fashion_and_beauty", | |
| "home_and_garden", | |
| "parenting_and_family", | |
| "relationships_and_dating", | |
| "education_and_schools", | |
| "faith_and_spirituality", | |
| "severe_weather", | |
| "disasters_and_accidents", | |
| "climate_change", | |
| "nature_and_wildlife", | |
| "energy_and_climate_solutions", | |
| "good_news_and_kindness", | |
| "offbeat_and_unusual", | |
| "animals_and_pets" | |
| ], | |
| "l2_parent": { | |
| "american_football": "sports", | |
| "animals_and_pets": "human_stories", | |
| "archaeology_and_history": "science_and_space", | |
| "artificial_intelligence": "tech_and_ai", | |
| "baseball": "sports", | |
| "basketball": "sports", | |
| "big_tech_and_startups": "tech_and_ai", | |
| "books_and_arts": "entertainment_and_pop_culture", | |
| "celebrities_and_gossip": "entertainment_and_pop_culture", | |
| "climate_change": "weather_and_environment", | |
| "college_sports": "sports", | |
| "combat_sports": "sports", | |
| "companies_and_industries": "money_and_business", | |
| "cost_of_living": "money_and_business", | |
| "courts_and_trials": "crime_and_justice", | |
| "crime_and_policing": "crime_and_justice", | |
| "crypto_and_fintech": "money_and_business", | |
| "cybersecurity_and_privacy": "tech_and_ai", | |
| "disasters_and_accidents": "weather_and_environment", | |
| "education_and_schools": "lifestyle", | |
| "elections_and_campaigns": "politics", | |
| "energy_and_climate_solutions": "weather_and_environment", | |
| "faith_and_spirituality": "lifestyle", | |
| "fashion_and_beauty": "lifestyle", | |
| "fitness_and_exercise": "health_and_wellness", | |
| "food_and_drink": "lifestyle", | |
| "gadgets_and_apps": "tech_and_ai", | |
| "gaming": "entertainment_and_pop_culture", | |
| "geopolitics_and_diplomacy": "world", | |
| "golf": "sports", | |
| "good_news_and_kindness": "human_stories", | |
| "government_and_policy": "politics", | |
| "hockey": "sports", | |
| "home_and_garden": "lifestyle", | |
| "housing_and_real_estate": "money_and_business", | |
| "humanitarian_crises": "world", | |
| "immigration_and_borders": "politics", | |
| "internet_culture_and_creators": "entertainment_and_pop_culture", | |
| "macro_economy_and_rates": "money_and_business", | |
| "markets_and_investing": "money_and_business", | |
| "media_and_journalism": "entertainment_and_pop_culture", | |
| "medical_and_public_health": "health_and_wellness", | |
| "mental_health": "health_and_wellness", | |
| "motorsports": "sports", | |
| "movies_and_tv": "entertainment_and_pop_culture", | |
| "music": "entertainment_and_pop_culture", | |
| "nature_and_wildlife": "weather_and_environment", | |
| "nutrition_and_diet": "health_and_wellness", | |
| "offbeat_and_unusual": "human_stories", | |
| "olympics": "sports", | |
| "other_sports": "sports", | |
| "parenting_and_family": "lifestyle", | |
| "personal_finance": "money_and_business", | |
| "political_figures_and_scandals": "politics", | |
| "psychology_and_behavior": "science_and_space", | |
| "relationships_and_dating": "lifestyle", | |
| "scams_and_fraud": "crime_and_justice", | |
| "scientific_discoveries": "science_and_space", | |
| "screen_time_and_digital_life": "tech_and_ai", | |
| "severe_weather": "weather_and_environment", | |
| "sleep_and_longevity": "health_and_wellness", | |
| "soccer": "sports", | |
| "social_issues_and_activism": "politics", | |
| "space_and_astronomy": "science_and_space", | |
| "state_and_local_politics": "politics", | |
| "tennis": "sports", | |
| "terrorism_and_security": "world", | |
| "travel_and_places": "lifestyle", | |
| "true_crime": "crime_and_justice", | |
| "war_and_conflict": "world", | |
| "work_and_careers": "money_and_business" | |
| }, | |
| "l2_thresholds": { | |
| "american_football": 0.5, | |
| "animals_and_pets": 0.55, | |
| "archaeology_and_history": 0.2, | |
| "artificial_intelligence": 0.45, | |
| "baseball": 0.35, | |
| "basketball": 0.45, | |
| "big_tech_and_startups": 0.3, | |
| "books_and_arts": 0.3, | |
| "celebrities_and_gossip": 0.45, | |
| "climate_change": 0.35, | |
| "college_sports": 0.35, | |
| "combat_sports": 0.35, | |
| "companies_and_industries": 0.4, | |
| "cost_of_living": 0.05, | |
| "courts_and_trials": 0.4, | |
| "crime_and_policing": 0.35, | |
| "crypto_and_fintech": 0.15, | |
| "cybersecurity_and_privacy": 0.35, | |
| "disasters_and_accidents": 0.4, | |
| "education_and_schools": 0.3, | |
| "elections_and_campaigns": 0.35, | |
| "energy_and_climate_solutions": 0.45, | |
| "faith_and_spirituality": 0.45, | |
| "fashion_and_beauty": 0.3, | |
| "fitness_and_exercise": 0.4, | |
| "food_and_drink": 0.3, | |
| "gadgets_and_apps": 0.3, | |
| "gaming": 0.15, | |
| "geopolitics_and_diplomacy": 0.45, | |
| "golf": 0.45, | |
| "good_news_and_kindness": 0.3, | |
| "government_and_policy": 0.3, | |
| "hockey": 0.15, | |
| "home_and_garden": 0.35, | |
| "housing_and_real_estate": 0.25, | |
| "humanitarian_crises": 0.25, | |
| "immigration_and_borders": 0.4, | |
| "internet_culture_and_creators": 0.05, | |
| "macro_economy_and_rates": 0.4, | |
| "markets_and_investing": 0.5, | |
| "media_and_journalism": 0.3, | |
| "medical_and_public_health": 0.45, | |
| "mental_health": 0.5, | |
| "motorsports": 0.25, | |
| "movies_and_tv": 0.35, | |
| "music": 0.45, | |
| "nature_and_wildlife": 0.35, | |
| "nutrition_and_diet": 0.55, | |
| "offbeat_and_unusual": 0.3, | |
| "olympics": 0.4, | |
| "other_sports": 0.25, | |
| "parenting_and_family": 0.35, | |
| "personal_finance": 0.1, | |
| "political_figures_and_scandals": 0.3, | |
| "psychology_and_behavior": 0.1, | |
| "relationships_and_dating": 0.35, | |
| "scams_and_fraud": 0.25, | |
| "scientific_discoveries": 0.35, | |
| "screen_time_and_digital_life": 0.1, | |
| "severe_weather": 0.5, | |
| "sleep_and_longevity": 0.05, | |
| "soccer": 0.3, | |
| "social_issues_and_activism": 0.4, | |
| "space_and_astronomy": 0.5, | |
| "state_and_local_politics": 0.05, | |
| "tennis": 0.3, | |
| "terrorism_and_security": 0.35, | |
| "travel_and_places": 0.35, | |
| "true_crime": 0.05, | |
| "war_and_conflict": 0.35, | |
| "work_and_careers": 0.4 | |
| }, | |
| "model_type": "snt_classifier", | |
| "snt_version": "v0.6", | |
| "transformers_version": "5.8.0" | |
| } | |