gkdivya commited on
Commit
7cd86dd
·
1 Parent(s): dd55e78

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -9
app.py CHANGED
@@ -18,15 +18,16 @@ nav_options = [
18
  ("Market Trends", False)
19
  ]
20
 
21
- # Function to display navigation options with disabled options shown in a different style
22
- def display_navigation_options(options):
23
- for option, is_enabled in options:
24
- if is_enabled:
25
- if st.sidebar.radio("Go to", [option]) == option:
26
- return option
27
- else:
28
- # Display disabled option with different styling (e.g., using markdown)
29
- st.sidebar.markdown(f"* ~~{option}~~ (coming soon)")
 
30
 
31
  # Get the selected option
32
  selection = display_navigation_options(nav_options)
 
18
  ("Market Trends", False)
19
  ]
20
 
21
+ # Create a list of enabled options for the radio button
22
+ enabled_options = [option for option, is_enabled in nav_options if is_enabled]
23
+
24
+ # Display radio buttons for enabled options
25
+ selected_option = st.sidebar.radio("Go to", enabled_options)
26
+
27
+ # Display disabled options as text
28
+ for option, is_enabled in nav_options:
29
+ if not is_enabled:
30
+ st.sidebar.markdown(f"* ~~{option}~~ (coming soon)")
31
 
32
  # Get the selected option
33
  selection = display_navigation_options(nav_options)