Downloads · 30 days
9
24% of all-time downloads
SaiCharan7829/smartHome_task_classification-distilBERT-66M
smartHome_task_classification-distilBERT-66M is a text classification model from SaiCharan7829. Use it when you need a label for a piece of text. The card lists the license as mit.
This is a fine-tuned DistilBERT-base-uncased model for intelligent routing of smart home assistant requests to appropriate agents. The model classifies user prompts into 5 categories: lighting, climate, security, ente…
Downloads · 30 days
9
24% of all-time downloads
All-time downloads
38
Public
Parameters
67M
268 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors268 MB · 99%
From the Hugging Face model README
This is a fine-tuned DistilBERT-base-uncased model for intelligent routing of smart home assistant requests to appropriate agents. The model classifies user prompts into 5 categories: lighting, climate, security, entertainment, appliance.
| Metric | Value |
|---|---|
| Accuracy | 100% |
| F1 Score | 100% |
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
tokenizer = AutoTokenizer.from_pretrained("SaiCharan7829/smartHome_task_classification-distilBERT-66M")
model = AutoModelForSequenceClassification.from_pretrained("SaiCharan7829/smartHome_task_classification-distilBERT-66M")
agents = ["lighting", "climate", "security", "entertainment", "appliance"]
prompt = "Turn on the living room lights. Current sensors: Temperature: 25°C, Humidity: 50%, Ambient Light: 200 lux, Human Presence: True, Location: living_room"
inputs = tokenizer(prompt, return_tensors="pt", truncation=True, padding=True, max_length=512)
with torch.no_grad():
outputs = model(**inputs)
predicted_class = torch.argmax(outputs.logits).item()
print(f"Predicted Agent: {agents[predicted_class]}")
model.safetensors: Model weightsconfig.json: Model configurationtokenizer.json: Tokenizer filesvocab.txt: Vocabularyspecial_tokens_map.json: Special tokenstraining_args.bin: Training argumentsThe synthetic dataset is included as synthetic_data.jsonl.
MIT License