title | emoji | colorFrom | colorTo | sdk | sdk_version | app_file | pinned |
---|---|---|---|---|---|---|---|
RideCastAI2.0 |
🚕 |
red |
yellow |
streamlit |
1.35.0 |
ui/app.py |
true |
🚦 RideCastAI 2.0 is a production-grade real-time ML system that predicts ride fares & ETAs, detects input/output drift, updates models live, and tracks latency — simulating a dynamic dispatch engine like Uber, Lyft, or Grab.
🎯 Designed for top-tier AI infrastructure roles where adaptability, performance, and monitoring are key.
Feature | 1.0 | 🚀 2.0 Upgrade |
---|---|---|
Prediction Scope | Static fare & ETA prediction | 🔁 Real-time prediction with async ingestion |
Drift Detection | None | ✅ Input + Output drift with visual alerts |
Model Adaptation | Offline model | ✅ Online learning with river |
Caching & Inference | None | ✅ ONNX + Joblib caching + asyncio |
Latency Tracking | No | ✅ Real-time latency chart |
Error Debugging | No | ✅ Live top-5 worst predictions |
UI | Basic chart | ✅ Tabbed Streamlit dashboard with toggles |
Deployability | Basic | ✅ Free-tier deployable on Hugging Face |
Rides (CSV/Simulated)
→ Feature Preprocessing
→ Model Inference (ONNX / River)
→ Caching Layer (Joblib)
→ Output Metrics Tracker (MAE / RMSE / Drift)
↳ Input Drift Detector (HalfSpaceTrees)
↳ Output Drift Detectors (KSWIN, ADWIN)
↳ Online Learner (River LinearRegression)
↳ Latency Tracker (Async + Retry logic)
↳ Streamlit UI with Live Dashboard:
- Prediction + Drift + Latency Tabs
- Drift Injection / Online Update Toggle
- Top-5 Error Viewer
- Logs + Trace Overlay
✅ Real-Time Fare & ETA Prediction
✅ Online Learning (River) — self-adapts to incoming data
✅ Input Drift Detection (HalfSpaceTrees)
✅ Output Drift Detection (KSWIN, ADWIN)
✅ ONNX-Optimized Model + Joblib Caching
✅ Live Top-5 Worst Prediction Viewer
✅ Latency Visualization per Batch
✅ Drift Injection Toggle for Testing
✅ Fully Modular Streamlit UI
✅ Free-tier Deployable (No LLMs required)
Each module is modular, production-grade, and latency-aware.
Component | Role | Tech Stack |
---|---|---|
🚕 Predictor | Predicts fare & ETA | scikit-learn , onnx , river |
🧠 Drift Detectors | Input (HalfSpaceTrees), Output (KSWIN/ADWIN) | river.drift |
♻️ Online Learner | Updates model weights per ride | river.linear_model.LinearRegression |
💾 Caching | Stores past predictions for reuse | joblib |
🕒 Latency Tracker | Logs inference time and averages | time , asyncio |
📈 Visual Overlay | RMSE, Drift Flags, Top-5 Errors | matplotlib , seaborn |
🧪 Drift Injector | Force anomaly to test system recovery | Manual + Config toggle |
🖥️ UI Layer | Live dashboard with tabs | Streamlit |
- Ingests a real-time ride (or simulated stream)
- Featurizes and routes through predictor
- Monitors:
- 🚨 Input Drift via HalfSpaceTrees
- 📉 Output Drift via KSWIN & ADWIN
- Updates model weights online (if enabled)
- Caches previous rides to reduce inference cost
- Logs latency, RMSE, drift spikes, and error outliers
- Visualizes all data on an elegant Streamlit UI
Tabbed layout includes:
- 🔮 Live Prediction — Real-time results + top-5 worst errors
⚠️ Drift & Metrics — Input + Output drift tracking + RMSE overlay- ⚡ Latency Monitor — Inference timing graph
- 🔧 Settings — Inject Drift, Enable Online Learning, View Architecture
📌 Try the live app here:
👉 RideCastAI 2.0 – Hugging Face Space
- 🚕 Predicted Fare: ₹184.76
- 🚕 Predicted ETA: 12.4 minutes
- 📊 RMSE (Last 50): Fare: ₹9.12 | ETA: 1.8 mins
- 📉 Drift:
- Input: ❌ No
- Output: ✅ ADWIN Triggered
- Latency: 1.2s
- In Top-5 Error: ✅ Yes → Underestimated ETA by 4.9 mins
RideCastAI2.0/
├── ui/
│ └── app.py # Streamlit frontend
├── model/
│ └── river_models.py # Drift + model logic
├── utils/
│ ├── latency_tracker.py
│ └── drift_plot_utils.py
├── data/
│ └── rides.csv # Input data
├── assets/
│ ├── ridecast_architecture.png # Arch Diagram
│ └── ridecast_demo.gif # UI Demo
└── requirements.txt
- ✅ Real-time architecture, not just static ML
- ✅ Combines drift detection + online learning + latency awareness
- ✅ Debuggable like internal Uber/Lyft tools
- ✅ Clean, modular UI with tabbed monitoring
- ✅ Designed for free-tier deployability with zero cost
- ✅ Built as a candidate portfolio app to demonstrate elite ML engineering
git clone https://github.com/rajesh1804/RideCastAI2.0
cd RideCastAI2.0
pip install -r requirements.txt
streamlit run ui/app.py
Project | Description | Link |
---|---|---|
🧵 ThreadNavigatorAI 2.0 | Multi-Agent Reddit thread analyzer with LLM-as-a-Judge | 🔗 View |
🛒 GroceryGPT+ | Vector search + reranking grocery assistant with fuzzy recall | 🔗 View |
🎬 StreamWiseAI | Netflix-style movie recommender with Retention Coach Agent | 🔗 View |
- 🧱
river
failed to install on Hugging Face (Rust required) → solved via downgrade toriver==0.15.1
- 🌀 Drift injection needed careful UI/UX isolation — solved with toggle + sidebar logs
- 🧠 ONNX conversion limited to scikit-learn baseline only (not River) — handled fallback with hybrid logic
- 🕒 Async scheduler in Streamlit was tricky — solved using
asyncio.create_task
+ stateful cache
Rajesh Marudhachalam — AI/ML Engineer building real-time, agentic, and production-grade AI systems.
📍 GitHub | LinkedIn
Projects: ThreadNavigatorAI2.0, StreamWiseAI, GroceryGPT+
- River — Streaming ML + Drift Detection
- Streamlit — UI Framework
- Hugging Face Spaces — App Hosting
MIT License
⭐️ Star this repo if it impressed you. Follow for more production-grade ML builds.