How sri-suruthi-saraswathi-s/taxi-fare-prediction-system works
This Flask application lets users enter trip details and receive a model-estimated fare, while saving each prediction for later history and dashboard analytics. The main workflow is form submission, input preparation, model prediction, persistence, and result rendering; the dashboard separately reads saved records and computes summary metrics. Route logic, model invocation, database operations, and their wiring are all shown in app.py. The database is created at runtime, so it is not present in the supplied file tree.
Main entry points: app.py Prediction route · index.html Trip form · result.html Fare result · taxi_fare_model.pkl Fare model
Components 10
Web interface
- Home route
app.py - Trip form
templates/index.html - Fare result
templates/result.html
Fare prediction
- Prediction route
app.py - Input preparation
app.py - Fare model
taxi_fare_model.pkl
History analytics
- Prediction history
app.py - Dashboard route
app.py - Analytics dashboard
templates/dashboard.html
Other components
- User
Connections 11
- User → Home route: requests
- Home route → Trip form: renders
- User → Trip form: enters trip
- Trip form → Prediction route: submits
- Prediction route → Input preparation: prepares inputs
- Prediction route → Fare model: predicts fare
- Prediction route → Prediction history: saves prediction
- Prediction route → Fare result: renders result
- User → Dashboard route: requests dashboard
- Dashboard route → Prediction history: reads history
- Dashboard route → Analytics dashboard: renders metrics