Text Classification
Transformers
Safetensors
English
bert
fill-mask
BERT
NeuroBERT
transformer
pre-training
nlp
tiny-bert
edge-ai
low-resource
micro-nlp
quantized
iot
wearable-ai
offline-assistant
intent-detection
real-time
smart-home
embedded-systems
command-classification
toy-robotics
voice-ai
eco-ai
english
lightweight
mobile-nlp
ner
text-embeddings-inference
Update README.md
Browse files
README.md
CHANGED
|
@@ -152,7 +152,7 @@ model = AutoModelForSequenceClassification.from_pretrained(model_name)
|
|
| 152 |
model.eval()
|
| 153 |
|
| 154 |
# 🧪 Example input
|
| 155 |
-
text = "Turn
|
| 156 |
|
| 157 |
# ✂️ Tokenize the input
|
| 158 |
inputs = tokenizer(text, return_tensors="pt")
|
|
@@ -236,7 +236,7 @@ for text, answer in tests:
|
|
| 236 |
top_scores = torch.softmax(topk.values, dim=1)[0]
|
| 237 |
guesses = [(tokenizer.decode([i]).strip().lower(), float(score)) for i, score in zip(top_ids, top_scores)]
|
| 238 |
results.append({
|
| 239 |
-
"sentence":
|
| 240 |
"expected": answer,
|
| 241 |
"predictions": guesses,
|
| 242 |
"pass": answer.lower() in [g[0] for g in guesses]
|
|
|
|
| 152 |
model.eval()
|
| 153 |
|
| 154 |
# 🧪 Example input
|
| 155 |
+
text = "Turn on the AC"
|
| 156 |
|
| 157 |
# ✂️ Tokenize the input
|
| 158 |
inputs = tokenizer(text, return_tensors="pt")
|
|
|
|
| 236 |
top_scores = torch.softmax(topk.values, dim=1)[0]
|
| 237 |
guesses = [(tokenizer.decode([i]).strip().lower(), float(score)) for i, score in zip(top_ids, top_scores)]
|
| 238 |
results.append({
|
| 239 |
+
"sentence": text,
|
| 240 |
"expected": answer,
|
| 241 |
"predictions": guesses,
|
| 242 |
"pass": answer.lower() in [g[0] for g in guesses]
|