Skip to content

Generate story for kids using some keywords, chapters with images, pdf generation

Notifications You must be signed in to change notification settings

cheuerde/story_generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

story_generator

Generate story for kids using some keywords, chapters with images, pdf generation

Dependencies

Usage

Run the shiny app:

# start shiny app (from within the shinyapp folder)
R -e "shiny::runApp()

Use the functions:

source("global.r")

# generate story
story = get_story(
    OPENAI_API_KEY = Sys.getenv("OAI_API_KEY"),
    model_in = "text-davinci-003",
    chapters = 4,
    words_per_chapter = 50,
    date = lubridate::today(),
    topic = "robbery in candyshop, detectives solve case",
    prompt = NULL,
)

out_folder = tempdir()

# create images and pdf
out = compile_story(
    story,
    create_images = TRUE,
    create_pdf = TRUE,
    folder = out_folder
)

# object out contain tex and markdown strings,
# as well as file locations
system(paste("open", out$pdf))

Screenshots

ui

pdf

About

Generate story for kids using some keywords, chapters with images, pdf generation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages