OCEANAI / app /event_handlers /practical_tasks.py
ElenaRyumina's picture
v0.3.0 (#3)
d0f716d verified
raw
history blame
755 Bytes
"""
File: practical_tasks.py
Author: Elena Ryumina and Dmitry Ryumin
Description: Event handler for Gradio app to filter practical tasks based on selected practical tasks.
License: MIT License
"""
# Importing necessary components for the Gradio app
from app.config import config_data
from app.practical_tasks import supported_practical_tasks
from app.components import radio_create_ui
def event_handler_practical_tasks(practical_tasks, practical_subtasks_selected):
return radio_create_ui(
practical_subtasks_selected[practical_tasks],
config_data.Labels_PRACTICAL_SUBTASKS_LABEL,
supported_practical_tasks[practical_tasks],
config_data.InformationMessages_PRACTICAL_SUBTASKS_INFO,
True,
True,
)