Update ui.py
Browse files
ui.py
CHANGED
@@ -1,43 +1,43 @@
|
|
1 |
-
from shiny import ui
|
2 |
-
|
3 |
-
def create_ui():
|
4 |
-
app_ui = ui.page_fluid(
|
5 |
-
# App Title
|
6 |
-
ui.h1("Data Analysis App"),
|
7 |
-
|
8 |
-
# Layout with sidebar and main panel
|
9 |
-
ui.row(
|
10 |
-
# Sidebar panel
|
11 |
-
ui.column(4,
|
12 |
-
ui.input_file("file", "Upload CSV File",
|
13 |
-
accept=[".csv"]),
|
14 |
-
|
15 |
-
# First dropdown
|
16 |
-
ui.input_select("var1", "Select First Variable",
|
17 |
-
choices=[]),
|
18 |
-
|
19 |
-
# Second dropdown
|
20 |
-
ui.input_select("var2", "Select Second Variable",
|
21 |
-
choices=[]),
|
22 |
-
|
23 |
-
# Text input for plot title
|
24 |
-
ui.input_text("plot_title", "Enter Plot Title",
|
25 |
-
value="My Plot")
|
26 |
-
),
|
27 |
-
|
28 |
-
# Main panel with tabs
|
29 |
-
ui.column(8,
|
30 |
-
ui.navset_tab(
|
31 |
-
# Data Table tab
|
32 |
-
ui.
|
33 |
-
ui.output_table("table")
|
34 |
-
),
|
35 |
-
# Plot tab
|
36 |
-
ui.
|
37 |
-
ui.output_plot("plot")
|
38 |
-
)
|
39 |
-
)
|
40 |
-
)
|
41 |
-
)
|
42 |
-
)
|
43 |
return app_ui
|
|
|
1 |
+
from shiny import ui
|
2 |
+
|
3 |
+
def create_ui():
|
4 |
+
app_ui = ui.page_fluid(
|
5 |
+
# App Title
|
6 |
+
ui.h1("Data Analysis App"),
|
7 |
+
|
8 |
+
# Layout with sidebar and main panel
|
9 |
+
ui.row(
|
10 |
+
# Sidebar panel
|
11 |
+
ui.column(4,
|
12 |
+
ui.input_file("file", "Upload CSV File",
|
13 |
+
accept=[".csv"]),
|
14 |
+
|
15 |
+
# First dropdown
|
16 |
+
ui.input_select("var1", "Select First Variable",
|
17 |
+
choices=[]),
|
18 |
+
|
19 |
+
# Second dropdown
|
20 |
+
ui.input_select("var2", "Select Second Variable",
|
21 |
+
choices=[]),
|
22 |
+
|
23 |
+
# Text input for plot title
|
24 |
+
ui.input_text("plot_title", "Enter Plot Title",
|
25 |
+
value="My Plot")
|
26 |
+
),
|
27 |
+
|
28 |
+
# Main panel with tabs
|
29 |
+
ui.column(8,
|
30 |
+
ui.navset_tab(
|
31 |
+
# Data Table tab
|
32 |
+
ui.nav("Data Table",
|
33 |
+
ui.output_table("table")
|
34 |
+
),
|
35 |
+
# Plot tab
|
36 |
+
ui.nav("Plot",
|
37 |
+
ui.output_plot("plot")
|
38 |
+
)
|
39 |
+
)
|
40 |
+
)
|
41 |
+
)
|
42 |
+
)
|
43 |
return app_ui
|