Spaces:
Running
on
Zero
Running
on
Zero
Delete theme.py
Browse files
theme.py
DELETED
|
@@ -1,72 +0,0 @@
|
|
| 1 |
-
import gradio as gr
|
| 2 |
-
from gradio.themes import Soft
|
| 3 |
-
from gradio.themes.utils import colors, fonts, sizes
|
| 4 |
-
from typing import Iterable
|
| 5 |
-
|
| 6 |
-
colors.steel_blue = colors.Color(
|
| 7 |
-
name="steel_blue",
|
| 8 |
-
c50="#EBF3F8",
|
| 9 |
-
c100="#D3E5F0",
|
| 10 |
-
c200="#A8CCE1",
|
| 11 |
-
c300="#7DB3D2",
|
| 12 |
-
c400="#529AC3",
|
| 13 |
-
c500="#4682B4",
|
| 14 |
-
c600="#3E72A0",
|
| 15 |
-
c700="#36638C",
|
| 16 |
-
c800="#2E5378",
|
| 17 |
-
c900="#264364",
|
| 18 |
-
c950="#1E3450",
|
| 19 |
-
)
|
| 20 |
-
|
| 21 |
-
class SteelBlueTheme(Soft):
|
| 22 |
-
def __init__(
|
| 23 |
-
self,
|
| 24 |
-
*,
|
| 25 |
-
primary_hue: colors.Color | str = colors.gray,
|
| 26 |
-
secondary_hue: colors.Color | str = colors.steel_blue,
|
| 27 |
-
neutral_hue: colors.Color | str = colors.slate,
|
| 28 |
-
text_size: sizes.Size | str = sizes.text_lg,
|
| 29 |
-
font: fonts.Font | str | Iterable[fonts.Font | str] = (
|
| 30 |
-
fonts.GoogleFont("Outfit"), "Arial", "sans-serif",
|
| 31 |
-
),
|
| 32 |
-
font_mono: fonts.Font | str | Iterable[fonts.Font | str] = (
|
| 33 |
-
fonts.GoogleFont("IBM Plex Mono"), "ui-monospace", "monospace",
|
| 34 |
-
),
|
| 35 |
-
):
|
| 36 |
-
super().__init__(
|
| 37 |
-
primary_hue=primary_hue,
|
| 38 |
-
secondary_hue=secondary_hue,
|
| 39 |
-
neutral_hue=neutral_hue,
|
| 40 |
-
text_size=text_size,
|
| 41 |
-
font=font,
|
| 42 |
-
font_mono=font_mono,
|
| 43 |
-
)
|
| 44 |
-
super().set(
|
| 45 |
-
background_fill_primary="*primary_50",
|
| 46 |
-
background_fill_primary_dark="*primary_900",
|
| 47 |
-
body_background_fill="linear-gradient(135deg, *primary_200, *primary_100)",
|
| 48 |
-
body_background_fill_dark="linear-gradient(135deg, *primary_900, *primary_800)",
|
| 49 |
-
button_primary_text_color="white",
|
| 50 |
-
button_primary_text_color_hover="white",
|
| 51 |
-
button_primary_background_fill="linear-gradient(90deg, *secondary_500, *secondary_600)",
|
| 52 |
-
button_primary_background_fill_hover="linear-gradient(90deg, *secondary_600, *secondary_700)",
|
| 53 |
-
button_primary_background_fill_dark="linear-gradient(90deg, *secondary_600, *secondary_800)",
|
| 54 |
-
button_primary_background_fill_hover_dark="linear-gradient(90deg, *secondary_500, *secondary_500)",
|
| 55 |
-
button_secondary_text_color="black",
|
| 56 |
-
button_secondary_text_color_hover="white",
|
| 57 |
-
button_secondary_background_fill="linear-gradient(90deg, *primary_300, *primary_300)",
|
| 58 |
-
button_secondary_background_fill_hover="linear-gradient(90deg, *primary_400, *primary_400)",
|
| 59 |
-
button_secondary_background_fill_dark="linear-gradient(90deg, *primary_500, *primary_600)",
|
| 60 |
-
button_secondary_background_fill_hover_dark="linear-gradient(90deg, *primary_500, *primary_500)",
|
| 61 |
-
slider_color="*secondary_500",
|
| 62 |
-
slider_color_dark="*secondary_600",
|
| 63 |
-
block_title_text_weight="600",
|
| 64 |
-
block_border_width="3px",
|
| 65 |
-
block_shadow="*shadow_drop_lg",
|
| 66 |
-
button_primary_shadow="*shadow_drop_lg",
|
| 67 |
-
button_large_padding="11px",
|
| 68 |
-
color_accent_soft="*primary_100",
|
| 69 |
-
block_label_background_fill="*primary_200",
|
| 70 |
-
)
|
| 71 |
-
|
| 72 |
-
steel_blue_theme = SteelBlueTheme()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|