decrypt | R Documentation |
Returns a label for an image using a fitted model. The image can be either a
character vector (of length one or more) or an object of class captcha
.
decrypt(files, model)
files |
files to read. Can be either a character vector
or an object of class |
model |
model of class |
character vector of the predicted labels.
captcha_file <- system.file(
"examples/captcha/cadesp.jpg",
package = "captcha"
)
cap <- read_captcha(captcha_file)
if (interactive()) {
plot(cap)
}
# the code below uses access to the internet. If you want to run locally,
# download the model object from the releases site.
if (interactive() && torch::torch_is_installed()) {
model <- captcha_load_model("cadesp")
decrypt(cap, model_rfb)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.