Update app.py
Browse files
app.py
CHANGED
@@ -164,10 +164,10 @@ def update_options(selected_option):
|
|
164 |
|
165 |
with gr.Blocks() as demo:
|
166 |
with gr.Row():
|
167 |
-
dropdown_1 = gr.Dropdown(["Option 1", "Option 2", "Option 3"], label="Main Options")
|
168 |
-
dropdown_2 = gr.Dropdown(['just here', 'for the sake of it'], label="Sub Options")
|
169 |
|
170 |
-
# When the first dropdown changes, update the options in the second dropdown
|
171 |
-
dropdown_1.change(fn=update_options, inputs=dropdown_1, outputs=dropdown_2)
|
172 |
|
173 |
demo.launch()
|
|
|
164 |
|
165 |
with gr.Blocks() as demo:
|
166 |
with gr.Row():
|
167 |
+
dropdown_1 = gr.Dropdown(choices=["Option 1", "Option 2", "Option 3"], label="Main Options")
|
168 |
+
dropdown_2 = gr.Dropdown(choices=['just here', 'for the sake of it'], label="Sub Options")
|
169 |
|
170 |
+
# # When the first dropdown changes, update the options in the second dropdown
|
171 |
+
# dropdown_1.change(fn=update_options, inputs=dropdown_1, outputs=dropdown_2)
|
172 |
|
173 |
demo.launch()
|