Spaces:
Sleeping
Sleeping
File size: 1,085 Bytes
f096c5b |
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 |
#ui.R
library(shiny)
ui <- fluidPage(
titlePanel("BioAge Calculator"),
sidebarLayout(
sidebarPanel(
h4("Enter Your Details"),
textInput("name", "Name", placeholder = "Enter your full name"),
numericInput("age", "Chronological Age (years)", value = 30, min = 0, step = 1),
radioButtons("gender", "Gender", choices = c("Male", "Female"), inline = TRUE),
checkboxInput("smoker", "Smoker", value = FALSE),
numericInput("bmi", "BMI (Body Mass Index)", value = 25, min = 0, step = 0.1),
numericInput("waist_circumference", "Waist Circumference (cm)", value = 80, min = 0, step = 1),
actionButton("calculate", "Calculate BioAge", class = "btn-primary"),
br(),
br(),
downloadButton("downloadReport", "Download Report", class = "btn-success")
),
mainPanel(
h3("Result"),
p(
"Once you calculate your BioAge, a summary will appear in a popup window. ",
"Additionally, you can download a detailed report as a PDF using the button above."
)
)
)
)
|