How rohit-coder-py/shipsense-shipping-delay-prediction-pytorch works
ShipSense is a Streamlit application for estimating late-delivery risk from shipment attributes. Users enter one shipment or upload a CSV; the app prepares features, runs a trained PyTorch model, and presents probabilities and risk labels. Separate app capabilities provide dataset insights and model information. The source excerpts establish the model-loading and batch-scoring path; the README documents the broader single-input workflow. Some UI and training-data details are documented but not shown in sampled implementation code.
Main entry points: app.py Streamlit app · preprocessing.py Feature preprocessing · inference.py Inference · utils.py Risk presentation helpers
Components 13
Streamlit application
- Streamlit app
app.py - Single prediction
app.py - CSV prediction
app.py - Insights & EDA
app.py - Model info
app.py
Prediction pipeline
- Feature preprocessing
src/preprocessing.py - Inference
src/inference.py - Neural network
src/model.py
Data and model assets
- Cleaned shipment data
data/shipment_dataset_cleaned.csv - Trained model and transforms
models - EDA charts
graphs
Insights and guidance
- Risk presentation helpers
src/utils.py
Other components
- Shipment user
Connections 18
- Shipment user → Streamlit app: uses
README.md - Streamlit app → Single prediction: offers
README.md - Streamlit app → CSV prediction: offers
README.md - Streamlit app → Insights & EDA: offers
README.md - Streamlit app → Model info: offers
README.md - Single prediction → Feature preprocessing: prepares features
README.md - CSV prediction → Feature preprocessing: encodes and scales
app.py - CSV prediction → Inference: scores rows
app.py - Inference → Neural network: runs forward pass
src/inference.py - Inference → Feature preprocessing: loads feature settings
src/inference.py - Feature preprocessing → Trained model and transforms: loads transforms
src/preprocessing.py - Inference → Trained model and transforms: loads weights
src/inference.py - Single prediction → Risk presentation helpers: labels result
app.py - CSV prediction → Risk presentation helpers: labels scores
app.py - Insights & EDA → Risk presentation helpers: loads summary helpers
app.py - Risk presentation helpers → Cleaned shipment data: reads dataset
src/utils.py - Insights & EDA → EDA charts: displays charts
app.py - Model info → Feature preprocessing: shows model settings
app.py