Alvinn-aai commited on
Commit
dd9f7ee
·
1 Parent(s): 161f703

slight refactor

Browse files
Files changed (1) hide show
  1. app.py +20 -18
app.py CHANGED
@@ -160,26 +160,28 @@ def gate_submission(profile: gr.OAuthProfile | None):
160
  return gr.update(visible=False), gr.update(visible=True)
161
 
162
 
163
- cyber_theme = Base(
164
- # neon-ish accents driven by hues (affects tabs, primary buttons, sliders, etc.)
165
- primary_hue=colors.cyan, # selected tab / primary controls
166
- secondary_hue=colors.pink, # secondary accents
167
- neutral_hue=colors.gray, # keep neutrals subtle
168
- # # techno font
169
- # font=gr.themes.GoogleFont("Orbitron"),
170
- font_mono=gr.themes.GoogleFont("JetBrains Mono"),
171
- text_size=sizes.text_md, # keep defaults
172
- spacing_size=sizes.spacing_md,
173
- radius_size=sizes.radius_md,
174
- ).set(
175
- # keep overrides minimal—dark canvas; let hues do the rest
176
- body_background_fill="#0b0f14", # deep blue-black
177
- background_fill_primary="#0b0f14", # panels
178
- background_fill_secondary="#0e141a", # subtle contrast
179
- )
 
 
180
 
181
 
182
- blocks = gr.Blocks(css=custom_css, theme=cyber_theme)
183
  with blocks:
184
  gr.Image(
185
  "assets/banner.png",
 
160
  return gr.update(visible=False), gr.update(visible=True)
161
 
162
 
163
+ def get_theme():
164
+ cyber_theme = Base(
165
+ # neon-ish accents driven by hues (affects tabs, primary buttons, sliders, etc.)
166
+ primary_hue=colors.cyan, # selected tab / primary controls
167
+ secondary_hue=colors.pink, # secondary accents
168
+ neutral_hue=colors.gray, # keep neutrals subtle
169
+ # # techno font
170
+ # font=gr.themes.GoogleFont("Orbitron"),
171
+ font_mono=gr.themes.GoogleFont("JetBrains Mono"),
172
+ text_size=sizes.text_md, # keep defaults
173
+ spacing_size=sizes.spacing_md,
174
+ radius_size=sizes.radius_md,
175
+ ).set(
176
+ # keep overrides minimal—dark canvas; let hues do the rest
177
+ body_background_fill="#0b0f14", # deep blue-black
178
+ background_fill_primary="#0b0f14", # panels
179
+ background_fill_secondary="#0e141a", # subtle contrast
180
+ )
181
+ return cyber_theme
182
 
183
 
184
+ blocks = gr.Blocks(css=custom_css, theme=get_theme())
185
  with blocks:
186
  gr.Image(
187
  "assets/banner.png",