diff --git a/R/mod_create_image.R b/R/mod_create_image.R index 000419a..b741475 100644 --- a/R/mod_create_image.R +++ b/R/mod_create_image.R @@ -32,10 +32,10 @@ mod_create_image_server <- function(id) { ## START - MY CODE output$openaiResponse <- renderImage({ url <- get_url(input$createimage, input$imagesizes) - filename <- paste("inst/app/www",get_filename(url), sep = "/") - download.file(url,filename, mode = "wb") + filename <- paste("inst/app/www", get_filename(url), sep = "/") + download.file(url, filename, mode = "wb") img_dimension <- as.numeric(sapply(strsplit(input$imagesizes, "x"), getElement, 1)) - list(src = filename, contentType = "image/png",width = img_dimension, height = img_dimension, + list(src = filename, contentType = "image/png", width = img_dimension, height = img_dimension, alt = input$createimage) }, deleteFile = FALSE) |> bindEvent(input$buttonCreateImage) diff --git a/R/mod_show_gallery.R b/R/mod_show_gallery.R index 9950fe3..32ea749 100644 --- a/R/mod_show_gallery.R +++ b/R/mod_show_gallery.R @@ -25,7 +25,7 @@ mod_show_gallery_server <- function(id) { ns <- session$ns ## START - MY CODE - output$module_body = renderUI({ + output$module_body <- renderUI({ number_images <- length(get_images()) image_splits <- split(get_images(), cut(seq_along(get_images()), 4, labels = FALSE)) fluidRow( diff --git a/R/mod_show_instructions.R b/R/mod_show_instructions.R index 5fae5fa..adca956 100644 --- a/R/mod_show_instructions.R +++ b/R/mod_show_instructions.R @@ -29,7 +29,7 @@ mod_show_instructions_ui <- function(id) { p("After you have saved your API Key, click on the ", em("Create Image"), "tab."), p("In the text box, enter your description of the image that you would like produced."), p("Images can be generated in three sizes (in pixels):"), - tags$ul(tags$li("256 x 256"),tags$li("512 x 512"),tags$li("1024 x 1024")), + tags$ul(tags$li("256 x 256"), tags$li("512 x 512"), tags$li("1024 x 1024")), p("The images are created in a png format."), hr(), h4("Step 3 - View all images created"), diff --git a/dev/02_dev.R b/dev/02_dev.R index 3c0f5bc..30162b3 100644 --- a/dev/02_dev.R +++ b/dev/02_dev.R @@ -15,7 +15,7 @@ ## Dependencies ---- ## Amend DESCRIPTION with dependencies read from package code parsing -## install.package('attachment') # if needed. # The s is missing on package/s +## install.package('attachment') install.packages("attachment") attachment::att_amend_desc() ## Add one line by package you want to add as dependency"