Spaces:
Sleeping
Sleeping
Download themes.py from alienet/EasyTranslator: direct link, hf CLI and curl.
- Browser
- Download file 1.62 kB
-
https://huggingface.co/spaces/alienet/EasyTranslator/resolve/main/themes.py
- Command line
-
hf download hf://spaces/alienet/EasyTranslator/themes.py
-
curl -L -o themes.py https://huggingface.co/spaces/alienet/EasyTranslator/resolve/main/themes.py
1.62 kB
| from __future__ import annotations | |
| from typing import Iterable | |
| import gradio as gr | |
| from gradio.themes.base import Base | |
| from gradio.themes.default import Default | |
| from gradio.themes.utils import colors, fonts, sizes | |
| import time | |
| class Theme1(Base): | |
| def __init__( | |
| self, | |
| *, | |
| primary_hue: colors.Color | str = colors.emerald, | |
| secondary_hue: colors.Color | str = colors.blue, | |
| neutral_hue: colors.Color | str = colors.gray, | |
| spacing_size: sizes.Size | str = sizes.spacing_md, | |
| radius_size: sizes.Size | str = sizes.radius_md, | |
| text_size: sizes.Size | str = sizes.text_lg, | |
| font: fonts.Font | |
| | str | |
| | Iterable[fonts.Font | str] = ( | |
| fonts.GoogleFont("Quicksand"), | |
| "ui-sans-serif", | |
| "sans-serif", | |
| ), | |
| font_mono: fonts.Font | |
| | str | |
| | Iterable[fonts.Font | str] = ( | |
| fonts.GoogleFont("IBM Plex Mono"), | |
| "ui-monospace", | |
| "monospace", | |
| ), | |
| ): | |
| super().__init__( | |
| primary_hue=primary_hue, | |
| secondary_hue=secondary_hue, | |
| neutral_hue=neutral_hue, | |
| spacing_size=spacing_size, | |
| radius_size=radius_size, | |
| text_size=text_size, | |
| font=font, | |
| font_mono=font_mono, | |
| ) | |
| super().set( | |
| input_background_fill="*neutral_100", | |
| block_title_text_weight="600", | |
| block_border_width="3px", | |
| button_large_padding="32px", | |
| button_secondary_background_fill_hover="*neutral_300", | |
| ) | |