Spaces:
Running
Running
Fix dropdown initialization in Enhanced Dataset Mode
Browse files- Use gr.update() instead of gr.Dropdown() in initialize_interface()
- Properly updates dropdown choices and value on interface load
- Resolves empty 'Available Datasets' dropdown issue
- Datasets should now appear correctly in the dropdown menu
src/interface/enhanced_verification_ui.py
CHANGED
|
@@ -533,9 +533,9 @@ class EnhancedVerificationUIComponents:
|
|
| 533 |
first_info, first_dataset = controller.get_dataset_info(dataset_choices[0])
|
| 534 |
dataset_info = first_info
|
| 535 |
|
| 536 |
-
#
|
| 537 |
return (
|
| 538 |
-
gr.
|
| 539 |
dataset_info, # dataset_info_display
|
| 540 |
first_dataset, # current_dataset_state
|
| 541 |
status_msg # status_message
|
|
|
|
| 533 |
first_info, first_dataset = controller.get_dataset_info(dataset_choices[0])
|
| 534 |
dataset_info = first_info
|
| 535 |
|
| 536 |
+
# Use gr.update() to properly update the dropdown
|
| 537 |
return (
|
| 538 |
+
gr.update(choices=dataset_choices, value=dataset_choices[0] if dataset_choices else None), # dataset_selector
|
| 539 |
dataset_info, # dataset_info_display
|
| 540 |
first_dataset, # current_dataset_state
|
| 541 |
status_msg # status_message
|