Logo Lanfrica

ProffMash/Kenya-accident-severity-prediction

Domain:

peace and security

Record type:

software
Creator:
Pro
Host:
# Kenya Road Accident Severity Predictor This project builds a simple web app for predicting the severity of a road accident report using a trained machine learning model. It uses Streamlit for the user interface and a pre-trained scikit-learn pipeline stored in the models folder. ## Project overview The app allows a user to enter crash-related details such as: - date and time - county - latitude and longitude - number of social-media reports - report source It then returns: - a fatal-mention probability - a binary fatal-mention prediction - a predicted severity class - class probability values ## Project files - app.py - Streamlit application entry point - predict.py - feature engineering and prediction logic - county_lookup.csv - lookup data used for county-based features - requirements.txt - Python dependencies - models/ - trained model artifacts and metadata ## Requirements Python 3.9+ is recommended. Install the dependencies: ```bash pip install -r requirements.txt ``` ## Run the app Start the Streamlit app with: ```bash streamlit run app.py ``` Then open live URL shown in your browser. Live demo: kenya-accident-severity-pre… ## Notes This project uses a proxy label derived from social-media keyword mentions, so the predictions are indicative rather than official severity classifications. ## Example usage 1. Open the app in your browser. 2. Fill in the crash details form. 3. Click Predict severity. 4. Review the predicted severity and probability output.