The app.py
contains code for the flask application that can be run on its own. The rest of the files refer to the ie_bike_model
package.
this app is used to predict # users renting a bike in a specific
- Make sure you have
ie_bike_model
package installed, if not install it as follows:
$ pip install lib/
- Make sure you have
flask
installed, otherwise run the following:
$ pip install flask
- To run the app in the command line use one of the following
$ python app.py --debug
incase you need to run in debugging mode
or simply run the following
$ flask run
-
To see modules versions information, please visit http://127.0.0.1:5000/
-
Train first your model by running http://127.0.0.1:5000/train_and_persist
-
To train the model using POST method, please run http://127.0.0.1:5000/train then click on submit to see the training results
-
To see both train and predict at the same index level please visit http://127.0.0.1:5000/model then click on submit to see the training results
-
Then predict by openeing http://127.0.0.1:5000/predict?date=2011-06-30T10:00:00&weathersit=1&temperature_C=20&feeling_temperature_C=18&humidity=80&windspeed=5 with your browser.
-
Incase you decided to run the predict function without any parameters or some of them, the program will take care of that and will pass default values been initialized inside the predict function, for that you can try running the following