To predict whether a shipment will be delayed or on time based on data such as shipment details, vehicle type, weather conditions, traffic, and distance. Created a flask app and an API and test it using Postman
Install the requiremens using the following command:
pip install -r requirements.txt
run app.py
to start the flask app and set up the Postman agent.
To set up the Postman agent
-
Select the
POST
option and set the URL aslocalhost:5000/predict
-
In the input field enter the input details in a
JSON
format as follows:
{
"ShipmentID" : ,
"Orgin" : ,
"Destination" : ,
"Weather Conditions" : ,
"Weather Conditions" :
}
- Hit send and in the input section the Prediction would be shown if the shipment is "On Time" or "Delayed"