File size: 1,364 Bytes
1b575c8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
39
40
41
42
43
from shiny import ui

def create_ui():
    app_ui = ui.page_fluid(
        # App Title
        ui.h1("Data Analysis App"),
        
        # Layout with sidebar and main panel
        ui.row(
            # Sidebar panel
            ui.column(4,
                ui.input_file("file", "Upload CSV File", 
                            accept=[".csv"]),
                
                # First dropdown
                ui.input_select("var1", "Select First Variable", 
                              choices=[]),
                
                # Second dropdown
                ui.input_select("var2", "Select Second Variable", 
                              choices=[]),
                
                # Text input for plot title
                ui.input_text("plot_title", "Enter Plot Title", 
                            value="My Plot")
            ),
            
            # Main panel with tabs
            ui.column(8,
                ui.navset_tab(
                    # Data Table tab
                    ui.nav_panel("Data Table",
                        ui.output_table("table")
                    ),
                    # Plot tab
                    ui.nav_panel("Plot",
                        ui.output_plot("plot")
                    )
                )
            )
        )
    )
    return app_ui