OCEANAI / app /tabs.py
ElenaRyumina's picture
Summary
f51c1fd
raw
history blame
1.21 kB
"""
File: tabs.py
Author: Elena Ryumina and Dmitry Ryumin
Description: Gradio app tabs - Contains the definition of various tabs for the Gradio app interface.
License: MIT License
"""
import gradio as gr
# Importing necessary components for the Gradio app
from app.description import DESCRIPTION
from app.authors import AUTHORS
from app.config import config_data
from app.components import (
html_message,
files_create_ui,
video_create_ui,
button,
dataframe,
)
def app_tab():
gr.Markdown(value=DESCRIPTION)
with gr.Row():
files = files_create_ui()
video = video_create_ui()
with gr.Row():
calculate_pt_scores = button(
config_data.OtherMessages_CALCULATE_PT_SCORES,
False,
3,
"calculate_oceanai",
)
clear_app = button(
config_data.OtherMessages_CLEAR_APP, False, 1, "clear_oceanai"
)
notifications = html_message(config_data.InformationMessages_NOTI_VIDEOS, False)
pt_scores = dataframe(visible=False)
return (notifications, files, video, calculate_pt_scores, clear_app, pt_scores)
def about_authors_tab():
return gr.Markdown(value=AUTHORS)