Update app.py
Browse files
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(
|
50 |
-
value =
|
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])
|