astAPI-based EV efficiency prediction API using a trained machine learning inference support.
3.8K
📌 About the Project
EV Efficiency Predictor is a machine learning–based web API that predicts the efficiency category of an electric vehicle using its specifications such as battery capacity, range, charging time, speed, and safety features.
Github : https://github.com/rainerrodrigues/EV_Recommendation_System
live :
🚀 Features
Predicts EV efficiency using real-world vehicle attributes
FastAPI-based REST API
Machine Learning model loaded with joblib
Input validation using Pydantic
Fully Dockerized for easy deployment
CORS enabled for frontend integration
🛠️ Tech Stack
Backend: FastAPI
Machine Learning: Scikit-learn
Model Loading: Joblib
Data Handling: Pandas
Deployment: Docker
▶️ How to Use the Project 1️⃣ Clone the Repository git clone cd EV_Recommendation_System
2️⃣ Build the Docker Image docker build -t ev-efficiency-api .
3️⃣ Run the Docker Container docker run -p 8000:8000 ev-efficiency-api
4️⃣ Open the API in Browser
Swagger UI (API Docs): 👉 http://localhost:8000/docs
Home Page (UI): 👉 http://localhost:8000/
5️⃣ Make a Prediction (Using Swagger UI)
Open /docs
Click on POST /predict
Click Try it out
Enter input like:
{ "manufacturer": "Tesla", "model": "Model 3", "type": "Sedan", "drive_type": "RWD", "fuel_type": "Electric", "color": "White", "fast_charging": "Yes", "country": "USA", "city": "San Francisco", "battery_kwh": 75, "range_km": 500, "charging_time_hr": 1.2, "release_year": 2024, "seats": 5, "acceleration_0_100_kmph": 3.3, "top_speed_kmph": 225, "warranty_years": 4, "cargo_space_liters": 425, "safety_rating": 5 }
Click Execute
6️⃣ Sample Output { "prediction": 1 }
1 → High Efficiency 0 → Low Efficiency
👥 Group Project Note
This project was developed as a group project, with collaborative contributions in:
Dataset cleaning and preprocessing
Feature engineering
Machine learning model training
Backend API development and Dockerization
Content type
Image
Digest
sha256:b20295f1f…
Size
209.7 MB
Last updated
8 months ago
docker pull mohdmusheer/ev-efficiency-api-g1