Spaces:
Sleeping
Sleeping
RamAnanth1
commited on
Commit
•
952a2cb
1
Parent(s):
ed9ce62
Update app.py
Browse files
app.py
CHANGED
@@ -41,7 +41,58 @@ def process_example(args):
|
|
41 |
|
42 |
css = ".generating {visibility: hidden}"
|
43 |
|
44 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
with gr.Column():
|
46 |
gr.Markdown(
|
47 |
""" ## Dolly 2.0
|
|
|
41 |
|
42 |
css = ".generating {visibility: hidden}"
|
43 |
|
44 |
+
# Based on the gradio theming guide
|
45 |
+
class SeafoamCustom(Base):
|
46 |
+
def __init__(
|
47 |
+
self,
|
48 |
+
*,
|
49 |
+
primary_hue: colors.Color | str = colors.emerald,
|
50 |
+
secondary_hue: colors.Color | str = colors.blue,
|
51 |
+
neutral_hue: colors.Color | str = colors.blue,
|
52 |
+
spacing_size: sizes.Size | str = sizes.spacing_md,
|
53 |
+
radius_size: sizes.Size | str = sizes.radius_md,
|
54 |
+
font: fonts.Font
|
55 |
+
| str
|
56 |
+
| Iterable[fonts.Font | str] = (
|
57 |
+
fonts.GoogleFont("Quicksand"),
|
58 |
+
"ui-sans-serif",
|
59 |
+
"sans-serif",
|
60 |
+
),
|
61 |
+
font_mono: fonts.Font
|
62 |
+
| str
|
63 |
+
| Iterable[fonts.Font | str] = (
|
64 |
+
fonts.GoogleFont("IBM Plex Mono"),
|
65 |
+
"ui-monospace",
|
66 |
+
"monospace",
|
67 |
+
),
|
68 |
+
):
|
69 |
+
super().__init__(
|
70 |
+
primary_hue=primary_hue,
|
71 |
+
secondary_hue=secondary_hue,
|
72 |
+
neutral_hue=neutral_hue,
|
73 |
+
spacing_size=spacing_size,
|
74 |
+
radius_size=radius_size,
|
75 |
+
font=font,
|
76 |
+
font_mono=font_mono,
|
77 |
+
)
|
78 |
+
super().set(
|
79 |
+
button_primary_background_fill="linear-gradient(90deg, *primary_300, *secondary_400)",
|
80 |
+
button_primary_background_fill_hover="linear-gradient(90deg, *primary_200, *secondary_300)",
|
81 |
+
button_primary_text_color="white",
|
82 |
+
button_primary_background_fill_dark="linear-gradient(90deg, *primary_600, *secondary_800)",
|
83 |
+
block_shadow="*shadow_drop_lg",
|
84 |
+
button_shadow="*shadow_drop_lg",
|
85 |
+
input_background_fill="zinc",
|
86 |
+
input_border_color="*secondary_300",
|
87 |
+
input_shadow="*shadow_drop",
|
88 |
+
input_shadow_focus="*shadow_drop_lg",
|
89 |
+
)
|
90 |
+
|
91 |
+
|
92 |
+
seafoam = SeafoamCustom()
|
93 |
+
|
94 |
+
|
95 |
+
with gr.Blocks(theme=seafoam, analytics_enabled=False, css=css) as demo:
|
96 |
with gr.Column():
|
97 |
gr.Markdown(
|
98 |
""" ## Dolly 2.0
|