harishB97 commited on
Commit
ac15a12
·
verified ·
1 Parent(s): 8416448

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -5
app.py CHANGED
@@ -149,18 +149,14 @@
149
  # import gradio as gr
150
 
151
  def update_options(selected_option):
152
- # Logic to determine new options based on selected option
153
  if selected_option == "Option 1":
154
  new_options = ["Suboption 1.1", "Suboption 1.2"]
155
  elif selected_option == "Option 2":
156
  new_options = ["Suboption 2.1", "Suboption 2.2"]
157
  else:
158
  new_options = ["Suboption 3.1", "Suboption 3.2"]
159
-
160
  new_options = [selected_option, 'Something', 'something else']
161
-
162
- # # Return the new options to update the second dropdown
163
- # return new_options # Return current selection to persist it in the first dropdown
164
 
165
  # with gr.Blocks() as demo:
166
  # with gr.Row():
 
149
  # import gradio as gr
150
 
151
  def update_options(selected_option):
 
152
  if selected_option == "Option 1":
153
  new_options = ["Suboption 1.1", "Suboption 1.2"]
154
  elif selected_option == "Option 2":
155
  new_options = ["Suboption 2.1", "Suboption 2.2"]
156
  else:
157
  new_options = ["Suboption 3.1", "Suboption 3.2"]
 
158
  new_options = [selected_option, 'Something', 'something else']
159
+ return new_options # Return current selection to persist it in the first dropdown
 
 
160
 
161
  # with gr.Blocks() as demo:
162
  # with gr.Row():