import requests

# 定义上传文件的URL
url = "http://localhost:3397/upload_model/"

# 打开要上传的模型文件
file_path = "train_api/train_model_20240605_172031.pth"  # 替换为你要上传的模型文件路径
files = {'file': open(file_path, 'rb')}

# 发送POST请求上传文件
response = requests.post(url, files=files)

# 打印响应结果
print(response.status_code)
print(response.json())
