dfalbel commited on
Commit
3f76e67
1 Parent(s): e4947cc
Files changed (1) hide show
  1. app.R +2 -2
app.R CHANGED
@@ -95,7 +95,7 @@ server <- function(input, output, session) {
95
  # Observer used at app startup time to allow using the 'Send' button once the
96
  # model has been loaded.
97
  observe({
98
- if (is.null(self$is_loaded) || sess$is_loaded) return()
99
  cat("Loading model:",sess$sess$poll_process(), "\n")
100
  invalidateLater(1000, session)
101
 
@@ -107,7 +107,7 @@ server <- function(input, output, session) {
107
  }, onRejected = function(x) {
108
  shinyjs::disable("send")
109
  insert_message(paste0("😭 Error loading the model:\n", as.character(x)))
110
- self$is_loaded <- NULL # means failure!
111
  })
112
 
113
  NULL # we return NULL so we don't stuck waiting for the above.
 
95
  # Observer used at app startup time to allow using the 'Send' button once the
96
  # model has been loaded.
97
  observe({
98
+ if (is.null(sess$is_loaded) || sess$is_loaded) return()
99
  cat("Loading model:",sess$sess$poll_process(), "\n")
100
  invalidateLater(1000, session)
101
 
 
107
  }, onRejected = function(x) {
108
  shinyjs::disable("send")
109
  insert_message(paste0("😭 Error loading the model:\n", as.character(x)))
110
+ sess$is_loaded <- NULL # means failure!
111
  })
112
 
113
  NULL # we return NULL so we don't stuck waiting for the above.