提交 89070304 编写于 作者: M MRXLT

fix image http demo

上级 8e8dba02
......@@ -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"})
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.
先完成此消息的编辑!
想要评论请 注册