YashMK89 commited on
Commit
b694713
·
verified ·
1 Parent(s): 1b69ee7

update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -2
app.py CHANGED
@@ -56,8 +56,13 @@ st.title("Sentinel Dataset")
56
  main_selection = st.selectbox("Select Sentinel Dataset Category", list(data.keys()))
57
 
58
  if main_selection:
59
- sub_options = data[main_selection]["sub_options"]
60
- sub_selection = st.selectbox("Select Specific Dataset ID", list(sub_options.keys()))
 
 
 
 
 
61
 
62
  # Earth Engine Index Calculator Section
63
  st.header("Earth Engine Index Calculator")
 
56
  main_selection = st.selectbox("Select Sentinel Dataset Category", list(data.keys()))
57
 
58
  if main_selection:
59
+ # Check if 'sub_options' exists in the selected main_selection
60
+ if "sub_options" in data[main_selection]:
61
+ sub_options = data[main_selection]["sub_options"]
62
+ sub_selection = st.selectbox("Select Specific Dataset ID", list(sub_options.keys()))
63
+ else:
64
+ st.error(f"No sub-options available for the selected dataset category: {main_selection}")
65
+ sub_options = None # Set to None if no sub-options exist
66
 
67
  # Earth Engine Index Calculator Section
68
  st.header("Earth Engine Index Calculator")