Spaces:
Sleeping
Sleeping
| title: Range Safe Mode Prototype | |
| emoji: 😻 | |
| colorFrom: red | |
| colorTo: green | |
| sdk: gradio | |
| sdk_version: 5.49.1 | |
| app_file: app.py | |
| pinned: false | |
| license: mit | |
| short_description: Range safety calculator simulating realistic EV behaviour | |
| # Range Safe Mode Prototype | |
| ## Overview | |
| Range Safe Mode is an early functional prototype developed for **Project 2** in | |
| *Design and Deployment of AI/ML Systems*. | |
| The prototype helps EV drivers quickly determine whether they have enough battery | |
| to safely complete a trip using a simple **Safe / Marginal / Unsafe** indicator. | |
| This prototype is designed to test user understanding of multi factor energy | |
| prediction not to provide exact real world accuracy. | |
| --- | |
| ## What the Prototype Does | |
| The system estimates trip energy using: | |
| - Distance (km) | |
| - Elevation gain (m) | |
| - Average speed (km/h) | |
| - Temperature (°C) | |
| Then compares the required energy against: | |
| - Available battery (kWh) | |
| - Reserve buffer (kWh) | |
| The output includes: | |
| - **SAFE TO PROCEED** | |
| - **MARGINALLY SAFE** | |
| - **CHARGING REQUIRED** | |
| A short explanation and a confidence bar are also provided. | |
| --- | |
| ## Why the Margin Threshold is 5 kWh | |
| A **5 kWh safety margin** was chosen for the prototype because: | |
| - Most EVs consume **0.15–0.22 kWh per km**, so 5 kWh = ~25–30 km buffer. | |
| - It accounts for unexpected factors: sudden speed changes, weather shifts, detours. | |
| - Many OEMs recommend keeping a 5-10% buffer for battery health and uncertainty. | |
| - It prevents a route from being labeled “safe” when the margin is razor thin. | |
| This number is not meant to be exact, it is a **reasonable, user-friendly buffer** | |
| for a prototype that communicates the idea of confidence vs. risk. | |
| --- | |
| ## How to Use | |
| 1. Enter the battery and trip parameters. | |
| 2. Click **Submit**. | |
| 3. Read the safety classification and explanation. | |
| 4. Adjust inputs to test different scenarios. | |
| --- | |
| ## Limitations | |
| This prototype does **not** include: | |
| - Real map routing | |
| - Live elevation APIs | |
| - Weather or traffic data | |
| - Battery aging / degradation | |
| - Regenerative braking | |
| - Real EV calibration | |
| Energy estimates are **simulation-based** and meant for conceptual testing only. | |
| --- | |
| ## Tech Stack | |
| - Python | |
| - Gradio UI | |
| - Lightweight simulated EV energy model | |
| --- | |
| ## Future Extensions | |
| - Integrate elevation API (OpenElevation) | |
| - Add visual "range bubble" map overlay | |
| - Recommend fallback chargers | |
| - Combine with team features (queue prediction, congestion forecasting) | |
| Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference | |