Adding timeout for predictions.