server.R file modified to do the prediction directly