TIMBOVILL commited on
Commit
981a6f2
1 Parent(s): 55911f1

Upload Applio.py

Browse files
Files changed (1) hide show
  1. Applio.py +300 -0
Applio.py ADDED
@@ -0,0 +1,300 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from __future__ import annotations
2
+
3
+ from typing import Iterable
4
+ import gradio as gr
5
+
6
+ #gr.themes.builder()
7
+ from gradio.themes.base import Base
8
+ from gradio.themes.utils import colors, fonts, sizes
9
+ import time
10
+
11
+ class Applio(Base):
12
+ def __init__(
13
+ self,
14
+ *,
15
+ primary_hue: colors.Color | str = colors.green,
16
+ secondary_hue: colors.Color | str = colors.emerald,
17
+ neutral_hue: colors.Color | str = colors.neutral,
18
+ spacing_size: sizes.Size | str = sizes.spacing_md,
19
+ radius_size: sizes.Size | str = sizes.radius_md,
20
+ text_size: sizes.Size | str = sizes.text_lg,
21
+ font: fonts.Font
22
+ | str
23
+ | Iterable[fonts.Font | str] = (
24
+ 'Inter V',
25
+ fonts.GoogleFont('Inter'),
26
+ 'ui-sans-serif',
27
+ 'system-ui',
28
+ ),
29
+ font_mono: fonts.Font
30
+ | str
31
+ | Iterable[fonts.Font | str] = (
32
+ 'ui-monospace',
33
+ fonts.GoogleFont("Roboto Mono"),
34
+ 'Consolas',
35
+ 'monospace',
36
+ ),
37
+ ):
38
+ super().__init__(
39
+ primary_hue=primary_hue,
40
+ secondary_hue=secondary_hue,
41
+ neutral_hue=neutral_hue,
42
+ spacing_size=spacing_size,
43
+ radius_size=radius_size,
44
+ text_size=text_size,
45
+ font=font,
46
+ font_mono=font_mono,
47
+ )
48
+ self.name= "Applio",
49
+ self.secondary_100= "#dbeafe",
50
+ self.secondary_200= "#bfdbfe",
51
+ self.secondary_300= "#93c5fd",
52
+ self.secondary_400= "#60a5fa",
53
+ self.secondary_50= "#eff6ff",
54
+ self.secondary_500= "#3b82f6",
55
+ self.secondary_600= "#2563eb",
56
+ self.secondary_700= "#1d4ed8",
57
+ self.secondary_800= "#1e40af",
58
+ self.secondary_900= "#1e3a8a",
59
+ self.secondary_950= "#1d3660",
60
+
61
+ super().set(
62
+ # Blaise
63
+ background_fill_primary= "black",
64
+ background_fill_primary_dark="black",
65
+ background_fill_secondary= "black",
66
+ background_fill_secondary_dark="black",
67
+ block_background_fill= "*neutral_800",
68
+ block_background_fill_dark="*neutral_800",
69
+ block_border_color= "*border_color_primary",
70
+ block_border_color_dark= "*border_color_primary",
71
+ block_border_width= "1px",
72
+ block_border_width_dark= "1px",
73
+ block_info_text_color= "*body_text_color_subdued",
74
+ block_info_text_color_dark= "*body_text_color_subdued",
75
+ block_info_text_size= "*text_sm",
76
+ block_info_text_weight= "400",
77
+ block_label_background_fill= "*background_fill_primary",
78
+ block_label_background_fill_dark= "*background_fill_secondary",
79
+ block_label_border_color= "*border_color_primary",
80
+ block_label_border_color_dark= "*border_color_primary",
81
+ block_label_border_width= "1px",
82
+ block_label_border_width_dark= "1px",
83
+ block_label_margin= "0",
84
+ block_label_padding= "*spacing_sm *spacing_lg",
85
+ block_label_radius= "calc(*radius_lg - 1px) 0 calc(*radius_lg - 1px) 0",
86
+ block_label_right_radius= "0 calc(*radius_lg - 1px) 0 calc(*radius_lg - 1px)",
87
+ block_label_shadow= "*block_shadow",
88
+ block_label_text_color= "*neutral_200",
89
+ block_label_text_color_dark= "*neutral_200",
90
+ block_label_text_weight= "400",
91
+ block_padding= "*spacing_xl",
92
+ block_radius= "*radius_md",
93
+ block_shadow= "none",
94
+ block_shadow_dark= "none",
95
+ block_title_background_fill= "rgba(46,85,65,255)",
96
+ block_title_background_fill_dark= "rgba(46,85,65,255)",
97
+ block_title_border_color= "none",
98
+ block_title_border_color_dark= "none",
99
+ block_title_border_width= "0px",
100
+ block_title_padding= "*block_label_padding",
101
+ block_title_radius= "*block_label_radius",
102
+ block_title_text_color= "*neutral_200",
103
+ block_title_text_color_dark= "*neutral_200",
104
+ block_title_text_size= "*text_md",
105
+ block_title_text_weight= "600",
106
+ body_background_fill= "black",
107
+ body_background_fill_dark= "black",
108
+ body_text_color= "white",
109
+ body_text_color_dark= "white",
110
+ body_text_color_subdued= "*neutral_400",
111
+ body_text_color_subdued_dark= "*neutral_400",
112
+ body_text_size= "*text_md",
113
+ body_text_weight= "400",
114
+ border_color_accent= "*neutral_600",
115
+ border_color_accent_dark= "*neutral_600",
116
+ border_color_primary= "*neutral_800",
117
+ border_color_primary_dark= "*neutral_800",
118
+ button_border_width= "*input_border_width",
119
+ button_border_width_dark= "*input_border_width",
120
+ button_cancel_background_fill= "*button_secondary_background_fill",
121
+ button_cancel_background_fill_dark= "*button_secondary_background_fill",
122
+ button_cancel_background_fill_hover= "*button_cancel_background_fill",
123
+ button_cancel_background_fill_hover_dark= "*button_cancel_background_fill",
124
+ button_cancel_border_color= "*button_secondary_border_color",
125
+ button_cancel_border_color_dark= "*button_secondary_border_color",
126
+ button_cancel_border_color_hover= "*button_cancel_border_color",
127
+ button_cancel_border_color_hover_dark= "*button_cancel_border_color",
128
+ button_cancel_text_color= "*button_secondary_text_color",
129
+ button_cancel_text_color_dark= "*button_secondary_text_color",
130
+ button_cancel_text_color_hover= "*button_cancel_text_color",
131
+ button_cancel_text_color_hover_dark= "*button_cancel_text_color",
132
+ button_large_padding= "*spacing_lg calc(2 * *spacing_lg)",
133
+ button_large_radius= "*radius_lg",
134
+ button_large_text_size= "*text_lg",
135
+ button_large_text_weight= "600",
136
+ button_primary_background_fill= "*primary_600",
137
+ button_primary_background_fill_dark= "*primary_600",
138
+ button_primary_background_fill_hover= "*primary_500",
139
+ button_primary_background_fill_hover_dark= "*primary_500",
140
+ button_primary_border_color= "*primary_500",
141
+ button_primary_border_color_dark= "*primary_500",
142
+ button_primary_border_color_hover= "*primary_400",
143
+ button_primary_border_color_hover_dark= "*primary_400",
144
+ button_primary_text_color= "white",
145
+ button_primary_text_color_dark= "white",
146
+ button_primary_text_color_hover= "*button_primary_text_color",
147
+ button_primary_text_color_hover_dark= "*button_primary_text_color",
148
+ button_secondary_background_fill= "transparent",
149
+ button_secondary_background_fill_dark= "transparent",
150
+ button_secondary_background_fill_hover= "*neutral_800",
151
+ button_secondary_background_fill_hover_dark= "*neutral_800",
152
+ button_secondary_border_color= "*neutral_700",
153
+ button_secondary_border_color_dark= "*neutral_700",
154
+ button_secondary_border_color_hover= "*neutral_600",
155
+ button_secondary_border_color_hover_dark= "*neutral_600",
156
+ button_secondary_text_color= "white",
157
+ button_secondary_text_color_dark= "white",
158
+ button_secondary_text_color_hover= "*button_secondary_text_color",
159
+ button_secondary_text_color_hover_dark= "*button_secondary_text_color",
160
+ button_shadow= "none",
161
+ button_shadow_active= "*shadow_inset",
162
+ button_shadow_hover= "none",
163
+ button_small_padding= "*spacing_sm calc(2 * *spacing_sm)",
164
+ button_small_radius= "*radius_lg",
165
+ button_small_text_size= "*text_md",
166
+ button_small_text_weight= "400",
167
+ button_transition= "0.3s ease all",
168
+ chatbot_code_background_color= "*neutral_800",
169
+ chatbot_code_background_color_dark= "*neutral_800",
170
+ checkbox_background_color= "*neutral_700",
171
+ checkbox_background_color_dark= "*neutral_700",
172
+ checkbox_background_color_focus= "*checkbox_background_color",
173
+ checkbox_background_color_focus_dark= "*checkbox_background_color",
174
+ checkbox_background_color_hover= "*checkbox_background_color",
175
+ checkbox_background_color_hover_dark= "*checkbox_background_color",
176
+ checkbox_background_color_selected= "*secondary_600",
177
+ checkbox_background_color_selected_dark= "*secondary_600",
178
+ checkbox_border_color= "*neutral_700",
179
+ checkbox_border_color_dark= "*neutral_700",
180
+ checkbox_border_color_focus= "*secondary_500",
181
+ checkbox_border_color_focus_dark= "*secondary_500",
182
+ checkbox_border_color_hover= "*neutral_600",
183
+ checkbox_border_color_hover_dark= "*neutral_600",
184
+ checkbox_border_color_selected= "*secondary_600",
185
+ checkbox_border_color_selected_dark= "*secondary_600",
186
+ checkbox_border_radius= "*radius_sm",
187
+ checkbox_border_width= "*input_border_width",
188
+ checkbox_border_width_dark= "*input_border_width",
189
+ checkbox_check= "url(\"data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e\")",
190
+ checkbox_label_background_fill= "transparent",
191
+ checkbox_label_background_fill_dark= "transparent",
192
+ checkbox_label_background_fill_hover= "transparent",
193
+ checkbox_label_background_fill_hover_dark= "transparent",
194
+ checkbox_label_background_fill_selected= "transparent",
195
+ checkbox_label_background_fill_selected_dark= "transparent",
196
+ checkbox_label_border_color= "transparent",
197
+ checkbox_label_border_color_dark= "transparent",
198
+ checkbox_label_border_color_hover= "transparent",
199
+ checkbox_label_border_color_hover_dark= "transparent",
200
+ checkbox_label_border_width= "transparent",
201
+ checkbox_label_border_width_dark= "transparent",
202
+ checkbox_label_gap= "*spacing_lg",
203
+ checkbox_label_padding= "*spacing_md calc(2 * *spacing_md)",
204
+ checkbox_label_shadow= "none",
205
+ checkbox_label_text_color= "*body_text_color",
206
+ checkbox_label_text_color_dark= "*body_text_color",
207
+ checkbox_label_text_color_selected= "*checkbox_label_text_color",
208
+ checkbox_label_text_color_selected_dark= "*checkbox_label_text_color",
209
+ checkbox_label_text_size= "*text_md",
210
+ checkbox_label_text_weight= "400",
211
+ checkbox_shadow= "*input_shadow",
212
+ color_accent= "*primary_500",
213
+ color_accent_soft= "*primary_50",
214
+ color_accent_soft_dark= "*neutral_700",
215
+ container_radius= "*radius_xl",
216
+ embed_radius= "*radius_lg",
217
+ error_background_fill= "*background_fill_primary",
218
+ error_background_fill_dark= "*background_fill_primary",
219
+ error_border_color= "*border_color_primary",
220
+ error_border_color_dark= "*border_color_primary",
221
+ error_border_width= "1px",
222
+ error_border_width_dark= "1px",
223
+ error_text_color= "#ef4444",
224
+ error_text_color_dark= "#ef4444",
225
+
226
+ form_gap_width= "0px",
227
+ input_background_fill= "*neutral_900",
228
+ input_background_fill_dark= "*neutral_900",
229
+ input_background_fill_focus= "*secondary_600",
230
+ input_background_fill_focus_dark= "*secondary_600",
231
+ input_background_fill_hover= "*input_background_fill",
232
+ input_background_fill_hover_dark= "*input_background_fill",
233
+ input_border_color= "*neutral_700",
234
+ input_border_color_dark= "*neutral_700",
235
+ input_border_color_focus= "*secondary_600",
236
+ input_border_color_focus_dark= "*primary_600",
237
+ input_border_color_hover= "*input_border_color",
238
+ input_border_color_hover_dark= "*input_border_color",
239
+ input_border_width= "1px",
240
+ input_border_width_dark= "1px",
241
+ input_padding= "*spacing_xl",
242
+ input_placeholder_color= "*neutral_500",
243
+ input_placeholder_color_dark= "*neutral_500",
244
+ input_radius= "*radius_lg",
245
+ input_shadow= "none",
246
+ input_shadow_dark= "none",
247
+ input_shadow_focus= "*input_shadow",
248
+ input_shadow_focus_dark= "*input_shadow",
249
+ input_text_size= "*text_md",
250
+ input_text_weight= "400",
251
+ layout_gap= "*spacing_xxl",
252
+ link_text_color= "*secondary_500",
253
+ link_text_color_active= "*secondary_500",
254
+ link_text_color_active_dark= "*secondary_500",
255
+ link_text_color_dark= "*secondary_500",
256
+ link_text_color_hover= "*secondary_400",
257
+ link_text_color_hover_dark= "*secondary_400",
258
+ link_text_color_visited= "*secondary_600",
259
+ link_text_color_visited_dark= "*secondary_600",
260
+ loader_color= "*color_accent",
261
+ loader_color_dark= "*color_accent",
262
+
263
+ panel_background_fill= "*background_fill_secondary",
264
+ panel_background_fill_dark= "*background_fill_secondary",
265
+ panel_border_color= "*border_color_primary",
266
+ panel_border_color_dark= "*border_color_primary",
267
+ panel_border_width= "1px",
268
+ panel_border_width_dark= "1px",
269
+
270
+
271
+ prose_header_text_weight= "600",
272
+ prose_text_size= "*text_md",
273
+ prose_text_weight= "400",
274
+ radio_circle= "url(\"data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e\")",
275
+
276
+ section_header_text_size= "*text_md",
277
+ section_header_text_weight= "400",
278
+ shadow_drop= "rgba(0,0,0,0.05) 0px 1px 2px 0px",
279
+ shadow_drop_lg= "0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",
280
+ shadow_inset= "rgba(0,0,0,0.05) 0px 2px 4px 0px inset",
281
+ shadow_spread= "3px",
282
+ shadow_spread_dark= "1px",
283
+ slider_color= "*primary_600",
284
+ slider_color_dark= "*primary_600",
285
+
286
+ stat_background_fill= "*primary_500",
287
+ stat_background_fill_dark= "*primary_500",
288
+ table_border_color= "*neutral_700",
289
+ table_border_color_dark= "*neutral_700",
290
+ table_even_background_fill= "*neutral_950",
291
+ table_even_background_fill_dark= "*neutral_950",
292
+ table_odd_background_fill= "*neutral_900",
293
+ table_odd_background_fill_dark= "*neutral_900",
294
+ table_radius= "*radius_lg",
295
+ table_row_focus= "*color_accent_soft",
296
+ table_row_focus_dark= "*color_accent_soft",
297
+
298
+ )
299
+
300
+