import requests
import pandas as pd
import numpy as np
# 这里使用的是load进行预测，可改(load/pv/water/carbon)
url = "http://127.0.0.1:2467/load"
data = {
    "inputs":(np.random.randn(24)*100).tolist()
}

response = requests.post(url, json=data)

print("Status Code:", response.status_code)  # 打印状态码
print("Response Content:", response.text)    # 打印响应内容

if response.status_code == 200:
    try:
        print(response.json())  # 尝试解析 JSON
    except requests.exceptions.JSONDecodeError as e:
        print("JSON Decode Error:", e)
else:
    print("Error:", response.status_code)