Views
No views yet
1from transformers import AutoTokenizer, AutoModelForSequenceClassification
2import torch
3
4model = AutoModelForSequenceClassification.from_pretrained("KevinDavidHayes/regressor-composite")
5tokenizer = AutoTokenizer.from_pretrained("KevinDavidHayes/regressor-composite")
6
7text = "Your text here..."
8inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=8192)
9
10with torch.no_grad():
11 score = model(**inputs).logits.item()
12
13# Higher score = text benefits more from long-range attention