Predict API Docs for:
This interface takes in 2 input(s) and returns 1 output(s).
The URL endpoint is:
Input(s): [ Slider , Checkbox ]
- Slider accepts the numeric input as type number
- Checkbox accepts the boolean input as type bool
Output(s): [ Image ]
- Image returns the base64 url data as type str
Payload:
{
"data": [ number , bool ]
}
Response:
{
"data": [ str ],
"durations": [ float ], # the time taken for the prediction to complete
"avg_durations": [ float ] # the average time taken for all predictions so far (used to estimate the runtime)
}
Try it (live demo):
import requests
r = requests.post(url='
',
json={"data":
[9,
true]})
r.json()
curl -X POST
-H 'Content-Type: application/json' -d '{"data": [9,
true]}'
fetch('', { method: "POST", body: JSON.stringify({"data":[ 9, true
]}), headers: { "Content-Type": "application/json" } }).then(function(response) { return response.json(); }).then(function(json_response){ console.log(json_response) })
{
"data": ,
"durations": ,
"avg_durations":
}