Spaces:
Sleeping
Sleeping
Update theme.py
Browse files
theme.py
CHANGED
@@ -1,91 +1,82 @@
|
|
1 |
-
from gradio.themes.base import Base
|
2 |
-
from gradio.themes.utils import colors, fonts, sizes
|
3 |
-
from typing import Iterable
|
4 |
-
|
5 |
-
class Style(Base):
|
6 |
-
def __init__(
|
7 |
-
self,
|
8 |
-
*,
|
9 |
-
primary_hue: colors.Color | str = colors.neutral,
|
10 |
-
secondary_hue: colors.Color | str = colors.neutral,
|
11 |
-
neutral_hue: colors.Color | str = colors.neutral,
|
12 |
-
spacing_size: sizes.Size | str = sizes.spacing_md,
|
13 |
-
radius_size: sizes.Size | str = sizes.radius_md,
|
14 |
-
text_size: sizes.Size | str = sizes.text_md,
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
#
|
30 |
-
#
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
body_background_fill_dark="#f8f9fa", # Very light gray background color
|
84 |
-
body_text_color="#212529", # Dark text color
|
85 |
-
body_text_color_dark="#212529", # Dark text color
|
86 |
-
body_text_color_subdued="#212529", # Subdued gray text color
|
87 |
-
body_text_color_subdued_dark="#212529", # Subdued gray text color
|
88 |
-
|
89 |
-
slider_color="#212529", # Subdued gray slider color
|
90 |
-
slider_color_dark="#212529", # Subdued gray slider color
|
91 |
-
)
|
|
|
1 |
+
from gradio.themes.base import Base
|
2 |
+
from gradio.themes.utils import colors, fonts, sizes
|
3 |
+
from typing import Iterable
|
4 |
+
|
5 |
+
class Style(Base):
|
6 |
+
def __init__(
|
7 |
+
self,
|
8 |
+
*,
|
9 |
+
primary_hue: colors.Color | str = colors.neutral,
|
10 |
+
secondary_hue: colors.Color | str = colors.neutral,
|
11 |
+
neutral_hue: colors.Color | str = colors.neutral,
|
12 |
+
spacing_size: sizes.Size | str = sizes.spacing_md,
|
13 |
+
radius_size: sizes.Size | str = sizes.radius_md,
|
14 |
+
text_size: sizes.Size | str = sizes.text_md,
|
15 |
+
):
|
16 |
+
super().__init__(
|
17 |
+
primary_hue=primary_hue,
|
18 |
+
secondary_hue=secondary_hue,
|
19 |
+
neutral_hue=neutral_hue,
|
20 |
+
spacing_size=spacing_size,
|
21 |
+
radius_size=radius_size,
|
22 |
+
text_size=text_size,
|
23 |
+
)
|
24 |
+
|
25 |
+
super().set(
|
26 |
+
background_fill_primary="#f8f9fa", # Very light gray background color
|
27 |
+
background_fill_primary_dark="#f8f9fa", # Very light gray background color
|
28 |
+
background_fill_secondary="#e9ecef", # Light gray background color
|
29 |
+
background_fill_secondary_dark="#e9ecef", # Light gray background color
|
30 |
+
block_background_fill="#f8f9fa", # Very light gray background color
|
31 |
+
block_background_fill_dark="#f8f9fa", # Very light gray background color
|
32 |
+
|
33 |
+
border_color_primary="#ced4da", # Light border color
|
34 |
+
border_color_primary_dark="#ced4da", # Light border color
|
35 |
+
|
36 |
+
link_text_color="#6c757d", # Subdued gray link color
|
37 |
+
link_text_color_dark="#6c757d", # Subdued gray link color
|
38 |
+
|
39 |
+
block_info_text_color="#212529", # Dark text color
|
40 |
+
block_info_text_color_dark="#212529", # Dark text
|
41 |
+
|
42 |
+
block_border_color="#ced4da", # Light border color
|
43 |
+
block_border_color_dark="#ced4da", # Light border color
|
44 |
+
|
45 |
+
input_background_fill="#ffffff", # Light background color
|
46 |
+
input_background_fill_dark="#ffffff", # Light background color
|
47 |
+
input_border_color="#ced4da", # Light border color
|
48 |
+
input_border_color_dark="#ced4da", # Light border color
|
49 |
+
input_border_width="2px",
|
50 |
+
|
51 |
+
block_label_background_fill="#f8f9fa", # Very light gray background color
|
52 |
+
block_label_background_fill_dark="#f8f9fa", # Very light gray background color
|
53 |
+
block_label_text_color="#212529", # Dark text color
|
54 |
+
block_label_text_color_dark="#212529", # Dark text color
|
55 |
+
|
56 |
+
button_primary_background_fill="#343a40", # Dark gray background color
|
57 |
+
button_primary_border_color_dark="#343a40", # Dark gray border color
|
58 |
+
button_primary_text_color="white", # Light text color
|
59 |
+
button_secondary_text_color_dark="black", # Light text color
|
60 |
+
|
61 |
+
block_title_background_fill="#f8f9fa", # Very light gray background color
|
62 |
+
block_title_background_fill_dark="#f8f9fa", # Very light gray background color
|
63 |
+
block_title_radius="*radius_sm",
|
64 |
+
block_title_text_color="#212529", # Dark text color
|
65 |
+
block_title_text_color_dark="#212529", # Dark text color
|
66 |
+
block_title_text_size="*text_lg",
|
67 |
+
block_title_border_width="0px", # Border width
|
68 |
+
block_title_border_width_dark="0px", # Border width
|
69 |
+
block_title_border_color="#ced4da", # Light border color
|
70 |
+
block_title_border_color_dark="#ced4da", # Light border color
|
71 |
+
block_title_text_weight="600",
|
72 |
+
|
73 |
+
body_background_fill="#f8f9fa", # Very light gray background color
|
74 |
+
body_background_fill_dark="#f8f9fa", # Very light gray background color
|
75 |
+
body_text_color="#212529", # Dark text color
|
76 |
+
body_text_color_dark="#212529", # Dark text color
|
77 |
+
body_text_color_subdued="#212529", # Subdued gray text color
|
78 |
+
body_text_color_subdued_dark="#212529", # Subdued gray text color
|
79 |
+
|
80 |
+
slider_color="#212529", # Subdued gray slider color
|
81 |
+
slider_color_dark="#212529", # Subdued gray slider color
|
82 |
+
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|