Spaces:
Running
Running
Create assets/theme.py
Browse files- assets/theme.py +43 -0
assets/theme.py
ADDED
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from __future__ import annotations
|
2 |
+
from typing import Iterable
|
3 |
+
import gradio as gr
|
4 |
+
from gradio.themes.base import Base
|
5 |
+
from gradio.themes.utils import colors, fonts, sizes
|
6 |
+
import time
|
7 |
+
|
8 |
+
class Ilaria(Base):
|
9 |
+
def __init__(
|
10 |
+
self,
|
11 |
+
*,
|
12 |
+
primary_hue: colors.Color | str = colors.pink,
|
13 |
+
secondary_hue: colors.Color | str = colors.purple,
|
14 |
+
neutral_hue: colors.Color | str = colors.gray,
|
15 |
+
spacing_size: sizes.Size | str = sizes.spacing_md,
|
16 |
+
radius_size: sizes.Size | str = sizes.radius_md,
|
17 |
+
text_size: sizes.Size | str = sizes.text_lg,
|
18 |
+
font: fonts.Font
|
19 |
+
| str
|
20 |
+
| Iterable[fonts.Font | str] = (
|
21 |
+
fonts.GoogleFont("Quicksand"),
|
22 |
+
"ui-sans-serif",
|
23 |
+
"sans-serif",
|
24 |
+
),
|
25 |
+
font_mono: fonts.Font
|
26 |
+
| str
|
27 |
+
| Iterable[fonts.Font | str] = (
|
28 |
+
fonts.GoogleFont("IBM Plex Mono"),
|
29 |
+
"ui-monospace",
|
30 |
+
"monospace",
|
31 |
+
),
|
32 |
+
):
|
33 |
+
super().__init__(
|
34 |
+
primary_hue=primary_hue,
|
35 |
+
secondary_hue=secondary_hue,
|
36 |
+
neutral_hue=neutral_hue,
|
37 |
+
spacing_size=spacing_size,
|
38 |
+
radius_size=radius_size,
|
39 |
+
text_size=text_size,
|
40 |
+
font=font,
|
41 |
+
font_mono=font_mono,
|
42 |
+
)
|
43 |
+
|