Spaces:
Sleeping
Sleeping
Update app.R
Browse files
app.R
CHANGED
@@ -179,15 +179,20 @@ ui <- fluidPage(
|
|
179 |
server <- function(input, output) {
|
180 |
|
181 |
# For the predictions dataset
|
|
|
|
|
|
|
|
|
182 |
predictions <- reactive({
|
183 |
-
|
184 |
-
if (is.null(input$file1))
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
|
|
|
|
189 |
predict(model, dataset)
|
190 |
-
|
191 |
})
|
192 |
|
193 |
# For the table
|
|
|
179 |
server <- function(input, output) {
|
180 |
|
181 |
# For the predictions dataset
|
182 |
+
|
183 |
+
# Path to the default file
|
184 |
+
default_file_path <- "./dataset_b.tsv"
|
185 |
+
|
186 |
predictions <- reactive({
|
187 |
+
# Use default file if no file is uploaded
|
188 |
+
file_path <- if (is.null(input$file1)) {
|
189 |
+
default_file_path
|
190 |
+
} else {
|
191 |
+
input$file1$datapath
|
192 |
+
}
|
193 |
+
|
194 |
+
dataset <- readr::read_delim(file_path, delim='\t')
|
195 |
predict(model, dataset)
|
|
|
196 |
})
|
197 |
|
198 |
# For the table
|