api <- function(path = tempfile(), workers = 2, port = 8000) {
model_queue_start(path, workers)
path_api <- system.file("api.R", package = "modelapi", mustWork = TRUE)
plumber::plumb(path_api)$run(port = port, swagger = TRUE)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.