Last active
March 7, 2019 02:17
-
-
Save shaun-jacks/3ed7f068c0056567a241df19260e909d to your computer and use it in GitHub Desktop.
UI within renderUI stage 1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## UI STAGE 1 CODE # | |
# begin a sidebar ui page | |
shiny::sidebarLayout( | |
shiny::sidebarPanel( | |
title = "Image and Analysis Selection", | |
# ask for file input from user | |
shiny::fileInput( | |
inputId = "file1", | |
label = "Input Image", | |
accept = c( | |
"image/png", | |
"image/jpeg" | |
) | |
), | |
# provide dropdown menu to select analysis type | |
shiny::selectInput( | |
inputId = "analysis_type", | |
label = "Analysis Type", | |
choices = c( # key (seen from user): value (for code) | |
"Select Analysis" = "analysis_select", | |
"Facial Detection" = "FACE_DETECTION", | |
"Label Detection" = "LABEL_DETECTION", | |
"Landmark Detection" = "LANDMARK_DETECTION", | |
"Logo Detection" = "LOGO_DETECTION", | |
"Object Localization" = "OBJECT_LOCALIZATION", | |
"Text Detection" = "TEXT_DETECTION" | |
) | |
), | |
# Allow for user to choose when to analyze with button | |
shiny::actionButton("analyze", "Analyze!"), | |
br(), | |
# If file not uploaded or analysis type not selected, warning | |
values$warning_inputs | |
), | |
shiny::mainPanel( | |
# do not need anything in here | |
) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment