提交 b9a806ca 编写于 作者: M MRXLT

fix image http demo

上级 9b55e963
......@@ -30,7 +30,10 @@ def predict(image_path, server):
req = json.dumps({"image": image, "fetch": ["score"]})
r = requests.post(
server, data=req, headers={"Content-Type": "application/json"})
print(r.json()["score"][0])
try:
print(r.json()["score"][0])
except ValueError:
print(r.text)
return r
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册