Download custom_theme.py from VadMyr86/Bootcamp: direct link, hf CLI and curl.
- Browser
- Download file 1.73 kB
-
https://huggingface.co/spaces/VadMyr86/Bootcamp/resolve/main/custom_theme.py
- Command line
-
hf download hf://spaces/VadMyr86/Bootcamp/custom_theme.py
-
curl -L -o custom_theme.py https://huggingface.co/spaces/VadMyr86/Bootcamp/resolve/main/custom_theme.py
1.73 kB
| from gradio.themes.base import Base | |
| from gradio.themes.utils import colors, fonts, sizes | |
| class CustomMinimalTheme(Base): | |
| def __init__(self): | |
| super().__init__( | |
| primary_hue=colors.indigo, | |
| secondary_hue=colors.sky, | |
| neutral_hue=colors.zinc, | |
| font=fonts.GoogleFont("Inter"), | |
| spacing_size=sizes.spacing_md, | |
| radius_size=sizes.radius_md, | |
| text_size=sizes.text_sm, | |
| ) | |
| self.set( | |
| # Background | |
| body_background_fill="linear-gradient(145deg, #f8fafc, #e0e7ff)", | |
| # Cards | |
| block_border_width="1px", | |
| block_shadow="0 2px 6px rgba(0,0,0,0.04)", | |
| block_radius="12px", | |
| # Inputs | |
| input_border_color="#d1d5db", | |
| # Buttons - Primary | |
| button_primary_background_fill="linear-gradient(90deg, #4f46e5, #6366f1)", | |
| button_primary_background_fill_hover="linear-gradient(90deg, #4338ca, #4f46e5)", | |
| button_primary_text_color="white", | |
| button_primary_border_color="#4338ca", | |
| button_primary_shadow="0 4px 14px rgba(79,70,229,0.35)", | |
| button_primary_shadow_hover="0 6px 16px rgba(79,70,229,0.45)", | |
| # Buttons - Secondary | |
| button_secondary_background_fill="linear-gradient(90deg, #e0f2fe, #bae6fd)", | |
| button_secondary_background_fill_hover="linear-gradient(90deg, #bae6fd, #7dd3fc)", | |
| button_secondary_text_color="#0369a1", | |
| button_secondary_border_color="#7dd3fc", | |
| button_secondary_shadow="0 2px 6px rgba(14,165,233,0.2)", | |
| button_secondary_shadow_hover="0 4px 10px rgba(14,165,233,0.3)" | |
| ) | |