I want to load a language for tesseract package in shinyapps.io
It works perfectly on my computer, but when I load the application to shinyapp.io I get the error:
Please make sure the TESSDATA_PREFIX environment variable is set to the parent directory of your "tessdata" directory.
Failed loading language 'ron'
Is there any way to do that from R code without using the cmd line? I do not have access to cmd line.
My code is this:
if (str_sub(packageVersion("tesseract"),start = 1, end = 1) != "4") {update.packages("tesseract")}
library(tesseract) # this makes sure that it loads the last version of tesseract
if (!"ron" %in% tesseract_info()[[2]]) {
tesseract_download(lang = "ron") } # this checks for "ron" language and downloads it if it does not find it
define_tesseract_engine <- tesseract(language = "ron")