Update app.py
Browse files
app.py
CHANGED
@@ -49,11 +49,11 @@ with gr.Blocks() as demo:
|
|
49 |
value = radio.value # Get the selected value from the radio button
|
50 |
|
51 |
if value == "Predefined Dataset":
|
52 |
-
predef = gr.Dropdown.update(visible=
|
53 |
-
upload = gr.UploadButton.update(visible=
|
54 |
elif value == "Upload Your Own":
|
55 |
-
predef = gr.Dropdown.update(visible=
|
56 |
-
upload = gr.UploadButton.update(visible=
|
57 |
return predef, upload # Return both components
|
58 |
|
59 |
dataset_predefined, dataset_upload = dataset_choice.change(update_visibility, dataset_choice, dataset_upload)
|
|
|
49 |
value = radio.value # Get the selected value from the radio button
|
50 |
|
51 |
if value == "Predefined Dataset":
|
52 |
+
predef = gr.Dropdown.update(visible=bool(1))
|
53 |
+
upload = gr.UploadButton.update(visible=bool(0))
|
54 |
elif value == "Upload Your Own":
|
55 |
+
predef = gr.Dropdown.update(visible=bool(0))
|
56 |
+
upload = gr.UploadButton.update(visible=bool(1))
|
57 |
return predef, upload # Return both components
|
58 |
|
59 |
dataset_predefined, dataset_upload = dataset_choice.change(update_visibility, dataset_choice, dataset_upload)
|