Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
rossarmstrong committed Feb 2, 2023
1 parent 0367453 commit 21d690c
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion R/fct_get_filename.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#' @return The return value, if any, from executing the function.
#'
#' @noRd
get_filename <- function(url){
get_filename <- function(url) {
pattern <- "img-.*?\\.png"
m <- gregexpr(pattern, url)
regmatches(url, m)[[1]]
Expand Down
2 changes: 1 addition & 1 deletion R/fct_get_images.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#' @return The return value, if any, from executing the function.
#'
#' @noRd
get_images <- function(){
get_images <- function() {
images <- list.files(path="inst/app/www", pattern=".png", all.files=FALSE, full.names=TRUE)
lapply(images,
function(x) {
Expand Down
2 changes: 1 addition & 1 deletion R/fct_get_url.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#' @return The return value, if any, from executing the function.
#'
#' @noRd
get_url <- function(prompt, size){
get_url <- function(prompt, size) {
openai::create_image(prompt = prompt,
n = 1,
size = size,
Expand Down
2 changes: 1 addition & 1 deletion R/fct_set_apikey.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#' @return The return value, if any, from executing the function.
#'
#' @noRd
set_apikey <- function(apikey){
set_apikey <- function(apikey) {
api_string <- paste("OPENAI_API_KEY=",apikey, sep = "")
fileConn<-file(".Renviron")
writeLines(api_string, fileConn)
Expand Down
6 changes: 3 additions & 3 deletions R/mod_create_image.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#' @noRd
#'
#' @importFrom shiny NS tagList
mod_create_image_ui <- function(id){
mod_create_image_ui <- function(id) {
ns <- NS(id)
tagList(

Expand All @@ -25,8 +25,8 @@ mod_create_image_ui <- function(id){
#' create_image Server Functions
#'
#' @noRd
mod_create_image_server <- function(id){
moduleServer(id, function(input, output, session){
mod_create_image_server <- function(id) {
moduleServer(id, function(input, output, session) {
ns <- session$ns

## START - MY CODE
Expand Down
6 changes: 3 additions & 3 deletions R/mod_input_apikey.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#' @noRd
#'
#' @importFrom shiny NS tagList
mod_input_apikey_ui <- function(id){
mod_input_apikey_ui <- function(id) {
ns <- NS(id)
tagList(

Expand All @@ -24,8 +24,8 @@ mod_input_apikey_ui <- function(id){
#' input_apikey Server Functions
#'
#' @noRd
mod_input_apikey_server <- function(id){
moduleServer(id, function(input, output, session){
mod_input_apikey_server <- function(id) {
moduleServer(id, function(input, output, session) {
ns <- session$ns

## START - MY CODE
Expand Down
6 changes: 3 additions & 3 deletions R/mod_show_gallery.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#' @noRd
#'
#' @importFrom shiny NS tagList
mod_show_gallery_ui <- function(id){
mod_show_gallery_ui <- function(id) {
ns <- NS(id)
tagList(

Expand All @@ -20,8 +20,8 @@ mod_show_gallery_ui <- function(id){
#' show_gallery Server Functions
#'
#' @noRd
mod_show_gallery_server <- function(id){
moduleServer(id, function(input, output, session){
mod_show_gallery_server <- function(id) {
moduleServer(id, function(input, output, session) {
ns <- session$ns

## START - MY CODE
Expand Down
6 changes: 3 additions & 3 deletions R/mod_show_instructions.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#' @noRd
#'
#' @importFrom shiny NS tagList
mod_show_instructions_ui <- function(id){
mod_show_instructions_ui <- function(id) {
ns <- NS(id)
tagList(

Expand Down Expand Up @@ -43,8 +43,8 @@ mod_show_instructions_ui <- function(id){
#' show_instructions Server Functions
#'
#' @noRd
mod_show_instructions_server <- function(id){
moduleServer(id, function(input, output, session){
mod_show_instructions_server <- function(id) {
moduleServer(id, function(input, output, session) {
ns <- session$ns

## START - MY CODE
Expand Down

0 comments on commit 21d690c

Please sign in to comment.