tykiww commited on
Commit
63ae374
·
verified ·
1 Parent(s): 5aa180d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -46,8 +46,8 @@ with gr.Blocks() as demo:
46
 
47
 
48
  # Update visibility based on user choice
49
- def update_visibility(radio):
50
- value = radio.value # Get the selected value from the radio button
51
 
52
  if value == "Predefined Dataset":
53
  dataset_predefined.visible = True
@@ -58,7 +58,6 @@ with gr.Blocks() as demo:
58
 
59
  # Bind the update_visibility function to the change event of dataset_choice
60
  dataset_choice.change(update_visibility)
61
-
62
 
63
  # Update visibility based on user choice
64
  #dataset_predefined, dataset_upload = dataset_choice.change(update_dataset_visibility, inputs=[dataset_choice], outputs=[dataset_predefined, dataset_upload])
 
46
 
47
 
48
  # Update visibility based on user choice
49
+ def update_visibility(event=None): # Accept the event argument, even if not used
50
+ value = dataset_choice.value # Get the selected value from the radio button
51
 
52
  if value == "Predefined Dataset":
53
  dataset_predefined.visible = True
 
58
 
59
  # Bind the update_visibility function to the change event of dataset_choice
60
  dataset_choice.change(update_visibility)
 
61
 
62
  # Update visibility based on user choice
63
  #dataset_predefined, dataset_upload = dataset_choice.change(update_dataset_visibility, inputs=[dataset_choice], outputs=[dataset_predefined, dataset_upload])