Implement ML-Based Crowd Level Prediction#179
Merged
Manjushwarofficial merged 2 commits intoOpenFlow-X:mainfrom Oct 26, 2025
Merged
Implement ML-Based Crowd Level Prediction#179Manjushwarofficial merged 2 commits intoOpenFlow-X:mainfrom
Manjushwarofficial merged 2 commits intoOpenFlow-X:mainfrom
Conversation
Thanks for creating a PR for your Issue!
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎯 Overview
This PR replaces the random crowd level generation with ML-driven predictions using the trained
RandomForestRegressormodel, transforming the fare estimator into an intelligent travel assistant with accurate, data-backed crowd insights.🔗 Closes Issue
Closes #177 - Implement ML-based crowd level prediction
📋 Changes Made
1. Model Integration
@st.cache_resourcedecorator to loadpassenger_flow_model.pklefficiently2. UI Enhancements
st.metric()to display predictions for both start and end stations3. Prediction Logic
predict_crowd_level()function with ML model integration4. Code Quality
random.choice()implementation🧪 Testing Completed
🔄 Breaking Changes
None - This is a pure enhancement. Existing functionality remains intact.
📚 Documentation Updates
🙏 Additional Notes
This PR demonstrates practical ML model deployment in a production Streamlit app. The implementation prioritizes:
Special thanks to @Manjushwarofficial for guidance on this enhancement!
👤 Contributor Checklist
Ready for review! 🚀