Hermit11 commited on
Commit
3acdee2
·
verified ·
1 Parent(s): 1b575c8

Update ui.py

Browse files
Files changed (1) hide show
  1. ui.py +42 -42
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.nav_panel("Data Table",
33
- ui.output_table("table")
34
- ),
35
- # Plot tab
36
- ui.nav_panel("Plot",
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