Skip to content

Commit 0a20a91

Browse files
committed
Shiny app ml_wine updated
1 parent e9ac86b commit 0a20a91

File tree

1 file changed

+3
-3
lines changed
  • inst/shiny/C03Ca_ml_wine

1 file changed

+3
-3
lines changed

inst/shiny/C03Ca_ml_wine/app.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ server <- function(input, output) {
149149
if (!grepl("^.+__.+\\.rds", file$name)) {
150150
"Le nom de votre fichier est incorrect : il faut <repos>__<model>.rds. Corrigez et resoumettez."
151151
} else {
152-
solution <- data.io::read$rds(file$datapath)$value
152+
solution <- data.io::read$rds(file$datapath)
153153
# Check if a model of the same name already exists
154154
name <- file$name
155155
project <- sub("(^.+)__.+$", "\\1", name)
@@ -169,7 +169,7 @@ server <- function(input, output) {
169169
file <- input$file
170170
if (!is.null(file$datapath) && grepl("^.+__.+\\.rds", file$name) &&
171171
!is_done()) {
172-
solution <- data.io::read$rds(file$datapath)$value
172+
solution <- data.io::read$rds(file$datapath)
173173
message("data read")
174174
score <- score_model(solution)
175175
message("score is ", score)
@@ -203,7 +203,7 @@ server <- function(input, output) {
203203
# Rework the ranking table
204204
if (NROW(ranking)) {
205205
ranking <- ranking[order(-ranking$score, as.numeric(ranking$date)), ]
206-
ranking$date <- as.POSIXct(ranking$date, origin = "1960-01-01")
206+
ranking$date <- as.POSIXct(ranking$date, origin = "1970-01-01")
207207
ranking$date <- format(ranking$date, "%Y-%m-%d %H:%M:%S")
208208
}
209209
message("Date reworked")

0 commit comments

Comments
 (0)