Downloads · 30 days
12
21% of all-time downloads
faisalsns/electric-vehicle-classifier
electric-vehicle-classifier is a tabular classification model from faisalsns. Use it for the tabular classification task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
This is a PyTorch-based neural network designed to classify electric vehicles as either:
Downloads · 30 days
12
21% of all-time downloads
All-time downloads
56
Public
Repo size
61.8 KB
Likes
0
Public
Click a slice to open those files.
.pth61.8 KB · 74%
From the Hugging Face model README
This is a PyTorch-based neural network designed to classify electric vehicles as either:
The model uses structured tabular data such as make, model, year, range, and price to predict the EV type. It is lightweight and optimized for fast inference on small-scale datasets.
import torch
from model import TabularModel # Ensure this matches your module structure
# Load model checkpoint
checkpoint = torch.load('ev_classifier_model.pth')
model = TabularModel(input_size=9, hidden_sizes=[128, 64, 32], output_size=2)
model.load_state_dict(checkpoint['model_state_dict'])
model.eval()
# Example inference
sample = torch.tensor([[0.5, 0.3, 2022, 250, 35000, 1, 0, 0.8, 0.6]]) # Replace with actual feature values
output = model(sample)
predicted_class = torch.argmax(output, dim=1)
print("Predicted class:", predicted_class.item()) # 0 = BEV, 1 = PHEV