from transformers import AutoTokenizer, AutoModelForSequenceClassification # Correctly load the tokenizer and model model_name = "ai4bharat/indic-bert" tokenizer = AutoTokenizer.from_pretrained(model_name) model = AutoModelForSequenceClassification.from_pretrained(model_name) # Example usage input_text = "This is a sample sentence for classification." inputs = tokenizer(input_text, return_tensors="pt") outputs = model(**inputs) print(outputs)