Predictions of Steady and Unsteady Flows using Machine-learned Surrogate Models