Skip to content

lorseee/dynamic-speed-predictor

Repository files navigation

Dynamic Speed Limit Prototype - Free (Leaflet + Simulated Weather)
-----------------------------------------------------------------

Files included:
- app.py : Flask backend that serves the frontend and the /predict endpoint (no external APIs)
- dynamic_speed_limit_model.pkl : Trained ML pipeline (RandomForest + OneHotEncoder)
- dynamic_speed_limit_dataset_free.csv : Dataset used to train the model (for reference)
- static/index.html : Frontend (Leaflet/OpenStreetMap) with controls and floating speed overlay
- requirements.txt : Python dependencies

Quick start (Windows PowerShell):
1. Extract the zip to your Desktop or a folder you choose.
2. Open PowerShell and change to the project folder, e.g.:
   cd %USERPROFILE%\Downloads\dynamic-speed-proto-free

3. (Optional) Create and activate virtual environment:
   python -m venv venv
   .\venv\Scripts\Activate.ps1

4. Install dependencies:
   pip install -r requirements.txt

5. Run the app:
   python app.py

6. Open in browser:
   http://127.0.0.1:5000/

How to use:
- Use the control panel to set Road Condition, Surroundings, Weather, and Traffic.
- Click 'Predict Speed' to get recommended speed and a short reason displayed at the bottom.
- The map uses OpenStreetMap tiles (free) and attempts to center on your location if allowed by the browser.

Notes:
- This is an offline demo; no API keys are required.
- The simulation functions pick realistic default values when you leave fields unchanged.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages