ThatOneKevDev commited on
Commit
0edb63c
·
verified ·
1 Parent(s): ba60745

attempt 4 at color change

Browse files
Files changed (1) hide show
  1. app.py +68 -67
app.py CHANGED
@@ -1,4 +1,72 @@
1
  import gradio as gr
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  from sentence_transformers import SentenceTransformer, util
3
  import openai
4
  import os
@@ -140,70 +208,3 @@ with gr.Blocks(theme='gstaff/xkcd') as demo:
140
 
141
  # Launch the Gradio app to allow user interaction
142
  demo.launch(share=True)
143
-
144
- theme = gr.themes.Default(
145
- primary_hue=gr.themes.Color(c100="#ffedd5", c200="#fed7aa", c300="#ffe09e", c400="#c2814c", c50="#fff8f0", c500="#f97316", c600="#ea580c", c700="#c2410c", c800="#9a3412", c900="#7c2d12", c950="#611f00"),
146
- secondary_hue="red",
147
- neutral_hue="slate",
148
- font=[gr.themes.GoogleFont('jack armstrong'), 'ui-sans-serif', 'system-ui', 'sans-serif'],
149
- font_mono=[gr.themes.GoogleFont('xkcd'), 'ui-monospace', 'Consolas', 'monospace'],
150
- ).set(
151
- body_text_color='*primary_950',
152
- body_text_color_dark='*secondary_50',
153
- body_text_size='*text_lg',
154
- body_text_color_subdued='*primary_400',
155
- body_text_weight='500',
156
- background_fill_primary='*primary_300',
157
- background_fill_primary_dark='*primary_800',
158
- background_fill_secondary='*primary_50',
159
- background_fill_secondary_dark='*primary_600',
160
- border_color_accent='*secondary_950',
161
- border_color_accent_dark='*body_text_color',
162
- border_color_accent_subdued='*border_color_accent',
163
- link_text_color='*secondary_800',
164
- code_background_fill='*neutral_200',
165
- code_background_fill_dark='*neutral_100',
166
- block_shadow='none',
167
- block_shadow_dark='none',
168
- form_gap_width='0px',
169
- checkbox_label_background_fill='*button_secondary_background_fill',
170
- checkbox_label_background_fill_dark='*button_secondary_background_fill',
171
- checkbox_label_background_fill_hover='*button_secondary_background_fill_hover',
172
- checkbox_label_background_fill_hover_dark='*button_secondary_background_fill_hover',
173
- checkbox_label_shadow='none',
174
- error_background_fill_dark='*background_fill_primary',
175
- input_background_fill='*neutral_100',
176
- input_background_fill_dark='*neutral_700',
177
- input_border_width='0px',
178
- input_border_width_dark='0px',
179
- input_shadow='none',
180
- input_shadow_dark='none',
181
- input_shadow_focus='*input_shadow',
182
- input_shadow_focus_dark='*input_shadow',
183
- stat_background_fill='*primary_300',
184
- stat_background_fill_dark='*primary_500',
185
- button_shadow='none',
186
- button_shadow_active='none',
187
- button_shadow_hover='none',
188
- button_transition='background-color 0.2s ease',
189
- button_primary_background_fill='*primary_200',
190
- button_primary_background_fill_dark='*primary_700',
191
- button_primary_background_fill_hover='*button_primary_background_fill',
192
- button_primary_background_fill_hover_dark='*button_primary_background_fill',
193
- button_primary_border_color_dark='*primary_600',
194
- button_secondary_background_fill='*neutral_200',
195
- button_secondary_background_fill_dark='*neutral_600',
196
- button_secondary_background_fill_hover='*button_secondary_background_fill',
197
- button_secondary_background_fill_hover_dark='*button_secondary_background_fill',
198
- button_cancel_background_fill='*button_secondary_background_fill',
199
- button_cancel_background_fill_dark='*button_secondary_background_fill',
200
- button_cancel_background_fill_hover='*button_cancel_background_fill',
201
- button_cancel_background_fill_hover_dark='*button_cancel_background_fill',
202
- button_cancel_border_color='*button_secondary_border_color',
203
- button_cancel_border_color_dark='*button_secondary_border_color',
204
- button_cancel_text_color='*button_secondary_text_color',
205
- button_cancel_text_color_dark='*button_secondary_text_color'
206
- )
207
-
208
- with gr.Blocks(theme=theme) as demo:
209
- ...
 
1
  import gradio as gr
2
+
3
+ theme = gr.themes.Default(
4
+ primary_hue=gr.themes.Color(c100="#ffedd5", c200="#fed7aa", c300="#ffe09e", c400="#c2814c", c50="#fff8f0", c500="#f97316", c600="#ea580c", c700="#c2410c", c800="#9a3412", c900="#7c2d12", c950="#611f00"),
5
+ secondary_hue="red",
6
+ neutral_hue="slate",
7
+ font=[gr.themes.GoogleFont('jack armstrong'), 'ui-sans-serif', 'system-ui', 'sans-serif'],
8
+ font_mono=[gr.themes.GoogleFont('xkcd'), 'ui-monospace', 'Consolas', 'monospace'],
9
+ ).set(
10
+ body_text_color='*primary_950',
11
+ body_text_color_dark='*secondary_50',
12
+ body_text_size='*text_lg',
13
+ body_text_color_subdued='*primary_400',
14
+ body_text_weight='500',
15
+ background_fill_primary='*primary_300',
16
+ background_fill_primary_dark='*primary_800',
17
+ background_fill_secondary='*primary_50',
18
+ background_fill_secondary_dark='*primary_600',
19
+ border_color_accent='*secondary_950',
20
+ border_color_accent_dark='*body_text_color',
21
+ border_color_accent_subdued='*border_color_accent',
22
+ link_text_color='*secondary_800',
23
+ code_background_fill='*neutral_200',
24
+ code_background_fill_dark='*neutral_100',
25
+ block_shadow='none',
26
+ block_shadow_dark='none',
27
+ form_gap_width='0px',
28
+ checkbox_label_background_fill='*button_secondary_background_fill',
29
+ checkbox_label_background_fill_dark='*button_secondary_background_fill',
30
+ checkbox_label_background_fill_hover='*button_secondary_background_fill_hover',
31
+ checkbox_label_background_fill_hover_dark='*button_secondary_background_fill_hover',
32
+ checkbox_label_shadow='none',
33
+ error_background_fill_dark='*background_fill_primary',
34
+ input_background_fill='*neutral_100',
35
+ input_background_fill_dark='*neutral_700',
36
+ input_border_width='0px',
37
+ input_border_width_dark='0px',
38
+ input_shadow='none',
39
+ input_shadow_dark='none',
40
+ input_shadow_focus='*input_shadow',
41
+ input_shadow_focus_dark='*input_shadow',
42
+ stat_background_fill='*primary_300',
43
+ stat_background_fill_dark='*primary_500',
44
+ button_shadow='none',
45
+ button_shadow_active='none',
46
+ button_shadow_hover='none',
47
+ button_transition='background-color 0.2s ease',
48
+ button_primary_background_fill='*primary_200',
49
+ button_primary_background_fill_dark='*primary_700',
50
+ button_primary_background_fill_hover='*button_primary_background_fill',
51
+ button_primary_background_fill_hover_dark='*button_primary_background_fill',
52
+ button_primary_border_color_dark='*primary_600',
53
+ button_secondary_background_fill='*neutral_200',
54
+ button_secondary_background_fill_dark='*neutral_600',
55
+ button_secondary_background_fill_hover='*button_secondary_background_fill',
56
+ button_secondary_background_fill_hover_dark='*button_secondary_background_fill',
57
+ button_cancel_background_fill='*button_secondary_background_fill',
58
+ button_cancel_background_fill_dark='*button_secondary_background_fill',
59
+ button_cancel_background_fill_hover='*button_cancel_background_fill',
60
+ button_cancel_background_fill_hover_dark='*button_cancel_background_fill',
61
+ button_cancel_border_color='*button_secondary_border_color',
62
+ button_cancel_border_color_dark='*button_secondary_border_color',
63
+ button_cancel_text_color='*button_secondary_text_color',
64
+ button_cancel_text_color_dark='*button_secondary_text_color'
65
+ )
66
+
67
+ with gr.Blocks(theme=theme) as demo:
68
+ ...
69
+
70
  from sentence_transformers import SentenceTransformer, util
71
  import openai
72
  import os
 
208
 
209
  # Launch the Gradio app to allow user interaction
210
  demo.launch(share=True)