Nothing
knitr::opts_chunk$set(echo = TRUE)
Pass a single-page pdf or image file to Document AI and get the output immediately:
library(daiR) ## Not run: myfile <- "<sample.pdf>" response <- dai_sync(myfile) text <- text_from_dai_response(response) cat(text)
Send larger batches for offline processing in three steps:
## Not run: library(googleCloudStorageR) my_pdfs <- c("<sample1.pdf>", "<sample2.pdf>") purrr::map(my_pdfs, ~ gcs_upload(.x, name = .x))
## Not run: dai_async(my_pdfs)
## Not run: bucket_contents <- gcs_list_objects() only_jsons <- grep("*.json", bucket_contents$name, value = TRUE) map(only_jsons, ~ gcs_get_object(.x, saveToDisk = .x)) text <- text_from_dai_file(only_jsons[1]) cat(text)
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.