Spaces:
Running on Zero
Running on Zero
Download app/components.py from DmitryRyumin/MASAI: direct link, hf CLI and curl.
- Browser
- Download file 520 Bytes
-
https://huggingface.co/spaces/DmitryRyumin/MASAI/resolve/refs%2Fpr%2F2/app/components.py
- Command line
-
hf download hf://spaces/DmitryRyumin/MASAI@refs/pr/2/app/components.py
-
curl -L -o components.py https://huggingface.co/spaces/DmitryRyumin/MASAI/resolve/refs%2Fpr%2F2/app/components.py
520 Bytes
| """ | |
| 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) | |