Added scaling for the plot and initiated the flask app