train 0.0.0.0:port=6661
运行train.py后, 等待传递参数进行训练
# 发送请求方法
import json
import requests
with open('train_params.json', 'r', encoding='utf-8') as f:
data = f.read()
url = "http://192.168.56.116:6661/train/params_json"
response = requests.post(url, files={"file": data})
print(response)
查询训练过程 0.0.0.0:port=6662
服务器运行命令
tensorboard --logdir=runs --host=0.0.0.0 --port 6662
客户端请求服务器数据
上传文件:
curl -X POST -F "file=@/path/to/your/file.zip" http://localhost:6664/upload
下载文件:
curl -X GET http://localhost:6664/download/file.zip -o downloaded_file.zip
删除文件:
curl -X POST http://localhost:6664/delete/file.zip
清空 uploads 目录:
curl -X POST http://localhost:6664/clear