File size: 520 Bytes
f16bb9f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
"""
File: components.py
Author: Dmitry Ryumin, Maxim Markitantov, Elena Ryumina, Anastasia Dvoynikova, and Alexey Karpov
Description: Utility functions for creating Gradio components.
License: MIT License
"""

import gradio as gr

# Importing necessary components for the Gradio app


def html_message(
    message: str = "", error: bool = True, visible: bool = True
) -> gr.HTML:
    css_class = "noti_err" if error else "noti_true"

    return gr.HTML(value=f"<h3 class='{css_class}'>{message}</h3>", visible=visible)