How esraa-elgebaly/uber-fare-prediction works
This repository is an Uber-fare prediction project with Flask interfaces around a saved scikit-learn pipeline. The main workflow accepts trip details, validates them, predicts a base fare, and applies ride-type, surge, and promo rules to produce a final estimate. It also exposes activity and pickup-heat data, and includes a separate JSON endpoint implementation. Task3 contains a parallel app and pipeline. The overview README is brief; connections for unsampled UI behavior and model loading are therefore limited to what the excerpts show.
Main entry points: app.py Web app · Task3/app.py Task3 web app · app_predict_endpoint.py JSON prediction · mobile.html Mobile form
Components 13
User interfaces
- Web app
app.py - Fare form
- Mobile form
Task3/mobile.html - Task3 web app
Task3/app.py - JSON prediction
app_predict_endpoint.py
Fare estimation
- Input validation
app.py - Fare rules
app.py - Fare pipeline
fare_pipeline.py - Saved model
final_pipeline.joblib - Task3 pipeline
Task3/fare_pipeline.py
Trip support
- Activity history
activity.json - Pickup data
final_internship_data.csv
Other components
- Rider
Connections 11
- Rider → Web app: submits trip
app.py - Web app → Fare form: renders
app.py - Web app → Input validation: validates
app.py - Input validation → Fare rules: passes valid trip
app.py - Fare rules → Fare pipeline: requests prediction
app.py - Fare rules → Rider: returns estimate
- Task3 web app → Task3 pipeline: imports utilities
Task3/app.py - Task3 web app → Mobile form: renders mobile page
- JSON prediction → Saved model: loads pipeline
app_predict_endpoint.py - Web app → Activity history: reads and writes
app.py - Web app → Pickup data: serves pickup points