-
Notifications
You must be signed in to change notification settings - Fork 1
API Server Protocol
neolgu edited this page Jun 13, 2021
·
4 revisions
Server address : http://sdnetapi.cf:5001/predict
The protocol uses HTTP POST method & FORM.
The image file must be sent in the HTTP
http://sdnetapi.cf:5001/predict FORM(img: img file)
In a normal case, a json file is returned.
{"pred_result": 0 or 1, "pred_probability": probability(float type) // 0: Fake, 1: Real}
When sent with GET
{"msg":"Try POSTing to the /predict endpoint with an RGB image attachment"}
When image fill error
{"msg": 'File Error. Please Check file is image.'}