Text Classification
Transformers
Safetensors
modernbert
fill-mask
sentiment-analysis
indic
multilingual
code-mixed
romanized
text-embeddings-inference
Instructions to use CobuildX-AI/cbx-indic-sentiment-classifier-58M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use CobuildX-AI/cbx-indic-sentiment-classifier-58M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="CobuildX-AI/cbx-indic-sentiment-classifier-58M")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForMaskedLM tokenizer = AutoTokenizer.from_pretrained("CobuildX-AI/cbx-indic-sentiment-classifier-58M") model = AutoModelForMaskedLM.from_pretrained("CobuildX-AI/cbx-indic-sentiment-classifier-58M", device_map="auto") - Notebooks
- Google Colab
- Kaggle
File size: 1,343 Bytes
cfe3e6e | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | # Copyright 2026 Cobuild Tech Private Limited
# SPDX-License-Identifier: Apache-2.0
"""Run from the model folder: python example.py (every text below is invented for this example)"""
from cbx_sentiment import SentimentClassifier
clf = SentimentClassifier(".")
texts = [
"Bahut badhiya phone hai, battery poora din chalti hai.", # romanized Hindi: great phone, the battery lasts all day
"ডেলিভারি তিন দিন দেরিতে এসেছে, খুবই হতাশ।", # Bengali: delivery came three days late, very disappointed
"நாளை காலை பத்து மணிக்கு கூட்டம் தொடங்கும்.", # Tamil: the meeting starts at ten tomorrow morning
"ಈ ಸಿನಿಮಾ ತುಂಬಾ ಚೆನ್ನಾಗಿದೆ, ಎಲ್ಲರೂ ನೋಡಿ!", # Kannada: this film is very good, everyone watch it
"सरकार ने नई योजना की घोषणा की है।", # Hindi: the government has announced a new scheme
"yaar kya bakwaas movie thi, paisa barbaad", # romanized Hindi: what a rubbish film, money wasted
"Service was okay but the food was cold and overpriced.",
]
for text, r in zip(texts, clf.classify(texts)):
print(f"{r['label']:<9} {max(r['scores'].values()):.2f} {text}")
|