Train a weather prediction model and create a Flask API
Prediting the daily max temperature for my Hometown Casablanca, Morocco.
MacOS, Linux & Windows:
python train.py
Download a large dataset of temperatures (Max, min, average it is your call) from your hometown for example. (In this repo I used data for Casablanca, Morocco).
Clean up the data and add it to the API folder, make sure to use the column names that I have in my own csv file or you can change the script to fit your csv
file in train.py
.
Then you can call use the train.py
to train the model and save it to the current directory.
Finally, you can predict the weather by running the Flask API or you can call the prediction function in predict.py
file.
MacOS, Linux & Windows:
python app.py
Hosted on Heroku
http://weather-prediction-api.herokuapp.com/{day}{month}{year}
August 24, 2019
http://weather-prediction-api.herokuapp.com/24082019
Omar MHAIMDAT – Linkedin – [email protected]
Distributed under the MIT license. See LICENSE
for more information.