File size: 821 Bytes
f51c1fd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
"""
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),
    )