Spaces:
Running
on
Zero
Running
on
Zero
Create theme.py
Browse files
theme.py
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
from gradio.themes.base import Base
|
3 |
+
from gradio.themes.utils import colors, fonts, sizes
|
4 |
+
|
5 |
+
class FastRTCTheme(Base):
|
6 |
+
def __init__(
|
7 |
+
self,
|
8 |
+
*,
|
9 |
+
primary_hue=colors.teal,
|
10 |
+
secondary_hue=colors.indigo,
|
11 |
+
neutral_hue=colors.gray,
|
12 |
+
spacing_size=sizes.spacing_md,
|
13 |
+
radius_size=sizes.radius_lg,
|
14 |
+
text_size=sizes.text_md,
|
15 |
+
font=(fonts.GoogleFont("Quicksand"), "ui-sans-serif", "sans-serif"),
|
16 |
+
font_mono=(fonts.GoogleFont("Fira Mono"), "ui-monospace", "monospace"),
|
17 |
+
):
|
18 |
+
super().__init__(
|
19 |
+
primary_hue=primary_hue,
|
20 |
+
secondary_hue=secondary_hue,
|
21 |
+
neutral_hue=neutral_hue,
|
22 |
+
spacing_size=spacing_size,
|
23 |
+
radius_size=radius_size,
|
24 |
+
text_size=text_size,
|
25 |
+
font=font,
|
26 |
+
font_mono=font_mono,
|
27 |
+
)
|
28 |
+
|
29 |
+
super().set(
|
30 |
+
body_background_fill="linear-gradient(135deg, *primary_50, *neutral_50)",
|
31 |
+
button_primary_background_fill="linear-gradient(90deg, *primary_400, *secondary_400)",
|
32 |
+
button_primary_background_fill_hover="linear-gradient(90deg, *primary_300, *secondary_300)",
|
33 |
+
button_primary_text_color="white",
|
34 |
+
block_title_text_weight="700",
|
35 |
+
slider_color="*primary_400",
|
36 |
+
loader_color="*secondary_300",
|
37 |
+
)
|
38 |
+
|
39 |
+
fast_rtc_theme = FastRTCTheme()
|