data-raw/api_template.R

##-----------------------------------------------------------------------------------------------------------
##  The trained model can be applied to outside data through a RESTful API (see demo for working example)   -
##-----------------------------------------------------------------------------------------------------------

library(plumber)

#Read the model
#mod <- readRDS("../models/<model_name>.mod")

#* @prediction_model  My Prediction API

#* Get model results
#* @param dt:list
#* @post /predict
#function(dt = new_records) {
 # Apply the model to input data
 # predict(mod, dt, type = "response") %>% return()
 # }
mkorvink/archetyper documentation built on April 5, 2021, 11:35 p.m.