-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathui.R
More file actions
73 lines (56 loc) · 1.73 KB
/
ui.R
File metadata and controls
73 lines (56 loc) · 1.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#This is the R code for a shiny application used for
# image classification. It depends on a csv file which
# contains a table with file path for every image.
# Aurélien Callens
# 14/04/2020
# 1) Read csv file (placed in the same repository of the applicati)
# 2) Select column with filepaths of images
# 3) Resume previous classification by selecting a column with result or create new one
# 4) Classify images by pushing buttons
# 5) Save the results to the csv file with save button
library(shiny)
library(shinydashboard)
library(tidyverse)
library(EBImage)
# Allow shiny to import csv file > 5 mo
options(shiny.maxRequestSize = 30*1024^2)
dash_side <- dashboardSidebar(
sidebarMenu(fileInput("file",
"Choose CSV File",
accept = c(
"text/csv",
".csv")
),
uiOutput("var_fp"),
uiOutput("var_cla")
)
)
dash_body <- dashboardBody(
fluidRow(
column(12, align="center",
h3(textOutput("test"))
)
),
br(),
imageOutput("imgPlot", width = "100%", height = "750px"),
br(),
fluidRow(
column(12, align="center",
actionButton("Class_1", "Class_1"),
actionButton("Class_2", "Class_2"),
actionButton("Class_3", "Class_3"),
actionButton("Class_4", "Class_4"),
actionButton("Class_5", "Class_5")
)
),
br(),
br(),
fluidRow(
column(12, align="center",
actionButton("Save", "Save")
)
)
)
dashboardPage(dashboardHeader(title = "Shiny image classifier"),
dash_side,
dash_body)