import joblib
import numpy as np


def load_carbon_model(path):
    gbm = joblib.load(path)
    return gbm
def carbon_forecast(inputs: np.ndarray, model):
    """_summary_

    Args:
        inputs (np.ndarray): 输入序列
        model (_type_): _description_
    """
    out = model.predict([inputs])
    return out


if __name__ == '__main__':
    model = load_carbon_model('./models/carbon_pred.joblib')
    inputs = np.random.randn(24)
    print(inputs.shape)
    out = carbon_forecast(inputs, model)
    print(out)