def model_predict(model, history, config):
    (n_input, _, _, _, _) = config
    x_input = array(history[(- n_input):]).reshape((1, n_input, 1))
    yhat = model.predict(x_input, verbose=0)
    return yhat[0]
def model_predict(model, history, config):
    (n_input, _, _, _, _) = config
    x_input = array(history[(- n_input):]).reshape((1, n_input, 1))
    yhat = model.predict(x_input, verbose=0)
    return yhat[0]