OCEANAI / app /event_handlers /clear_blocks.py
ElenaRyumina's picture
Summary
f51c1fd
raw
history blame
821 Bytes
"""
File: clear_blocks.py
Author: Elena Ryumina and Dmitry Ryumin
Description: Event handler for clearing Gradio app blocks and components.
License: MIT License
"""
# Importing necessary components for the Gradio app
from app.config import config_data
from app.components import (
html_message,
files_create_ui,
video_create_ui,
button,
dataframe,
)
def event_handler_clear_blocks():
return (
html_message(config_data.InformationMessages_NOTI_VIDEOS, False),
files_create_ui(),
video_create_ui(),
button(
config_data.OtherMessages_CALCULATE_PT_SCORES,
False,
3,
"calculate_oceanai",
),
button(config_data.OtherMessages_CLEAR_APP, False, 1, "clear_oceanai"),
dataframe(visible=False),
)