# NOT RUN {
if(interactive()){
### APP ###
library(shiny)
library(shinydashboard)
ui <- dashboardPage(
dashboardHeader(),
dashboardSidebar(),
dashboardBody(uiOutput("context"),
IMWatson::chatbotUI("watson"))
)
server <- function(input, output, session) {
rv <- reactiveValues(rv.chat = FALSE)
bot <- reactive({
callModule(IMWatson::chatbox, "watson", texlog)
})
output$context <- renderUI(bot()$magic)
}
shinyApp(ui, server)
}
# }
Run the code above in your browser using DataLab