-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathpart1_ex2_solution_app.py
More file actions
38 lines (32 loc) · 1009 Bytes
/
part1_ex2_solution_app.py
File metadata and controls
38 lines (32 loc) · 1009 Bytes
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
# PART 1 - Exercise 2 - Solution
# //////////////////////////////
from shiny import App, ui
app_ui = ui.page_fluid(
ui.h1("Python Shiny Survey"),
ui.row(
ui.column(
5,
ui.input_slider(
"exp",
"Experience from 0 (none) to 5 (expert)",
min=0,
max=5,
value=2,
),
ui.input_select(
"usage",
"I write Python Shiny apps ...",
choices=["Daily", "Weekly", "Monthly", "Yearly"],
),
ui.hr(),
ui.input_checkbox("preference", "I prefer Python Shiny over R Shiny"),
ui.input_text_area("learn", "What would you like to learn more about?"),
),
ui.column(7, ui.output_plot("plt")),
),
ui.input_action_button("submit", "Submit"),
)
# You can ignore the sever function for this exercise
def server(input, output, session):
pass
app = App(app_ui, server)