update app.py
Browse files
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
|
60 |
-
|
|
|
|
|
|
|
|
|
|
|
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")
|