def predict_next_periods(model, last_period, num_periods):
    predictions = []
    for _ in range(num_periods):
        next_period = model.predict(last_period[np.newaxis])
        predictions.append(next_period[0])
        last_period = np.roll(last_period, -7)
        last_period[-7:] = next_period
    return predictions

predicted_next_periods = predict_next_periods(model, x_train[-1], 5)
ValueError: could not broadcast input array from shape (1,35) into shape (1,7)