Views
No views yet
action, question, recall, or statement.[!IMPORTANT] This model is part of a personal project and is provided for experimentation and learning purposes. No further support or revisions guranteed.
| ID | Label |
|---|---|
| 0 | action |
| 1 | question |
| 2 | recall |
| 3 | statement |
1from transformers import AutoTokenizer, AutoModelForSequenceClassification
2import torch
3
4model_id = "AaryanK/ClassTrackClassify"
5tokenizer = AutoTokenizer.from_pretrained(model_id)
6model = AutoModelForSequenceClassification.from_pretrained(model_id)
7
8text = "What did we talk about earlier?"
9inputs = tokenizer(text, return_tensors="pt", truncation=True)
10
11with torch.no_grad():
12 logits = model(**inputs).logits
13
14label_id = logits.argmax(dim=-1).item()
15print(model.config.id2label[str(label_id)])