Post new data to a deployed model API endpoint and return predictions
Source:R/endpoint.R
predict.vetiver_endpoint.Rd
Post new data to a deployed model API endpoint and return predictions
Usage
# S3 method for class 'vetiver_endpoint'
predict(object, new_data, ...)
Arguments
- object
A model API endpoint object created with
vetiver_endpoint()
.- new_data
New data for making predictions, such as a data frame.
- ...
Extra arguments passed to
httr::POST()
Examples
if (FALSE) {
endpoint <- vetiver_endpoint("http://127.0.0.1:8088/predict")
predict(endpoint, mtcars[4:7, -1])
}