File size: 326 Bytes
5df3c06
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
import requests

url = "http://127.0.0.1:4011/predict/"
files = {'file': open('D:\zkwg\image\data\iamge1.jpg', 'rb')}  # 替换为您的图像路径
response = requests.post(url, files=files)

# 保存返回的预测结果
with open('D:\zkwg\image\data\prediction_result.png', 'wb') as f:
    f.write(response.content)