Nihal2000 commited on
Commit
d9ec965
·
1 Parent(s): 8bc2196

fix: Simplify theme to use only valid Gradio parameters

Browse files
Files changed (1) hide show
  1. theme.py +16 -46
theme.py CHANGED
@@ -13,63 +13,33 @@ def create_debuggenie_theme():
13
  neutral_hue="slate",
14
  font=gr.themes.GoogleFont("Inter"),
15
  font_mono=gr.themes.GoogleFont("JetBrains Mono"),
16
- ).set(
17
- # Dark mode background
18
- body_background_fill="linear-gradient(135deg, #0f172a 0%, #1e293b 100%)",
19
- body_background_fill_dark="linear-gradient(135deg, #0f172a 0%, #1e293b 100%)",
20
-
21
- # Panel backgrounds
22
- panel_background_fill="#1e293b",
23
- panel_background_fill_dark="#1e293b",
24
-
25
- # Input backgrounds
26
- input_background_fill="#334155",
27
- input_background_fill_dark="#334155",
28
- input_background_fill_focus="#475569",
29
- input_background_fill_focus_dark="#475569",
30
-
31
- # Button styles
32
- button_primary_background_fill="#6366f1",
33
- button_primary_background_fill_hover="#818cf8",
34
- button_primary_background_fill_dark="#6366f1",
35
  button_primary_text_color="white",
36
 
37
- button_secondary_background_fill="#8b5cf6",
38
- button_secondary_background_fill_hover="#a78bfa",
39
  button_secondary_text_color="white",
40
 
41
- # Success/Error colors
42
- button_cancel_background_fill="#ef4444",
43
- button_cancel_background_fill_hover="#f87171",
44
-
45
- # Text colors
46
  body_text_color="#f1f5f9",
47
- body_text_color_dark="#f1f5f9",
48
  body_text_color_subdued="#cbd5e1",
49
 
50
- # Border colors
51
- border_color_primary="#475569",
52
- border_color_primary_dark="#475569",
 
 
 
53
 
54
  # Shadows for depth
55
  shadow_drop="0 10px 15px -3px rgba(0, 0, 0, 0.3)",
56
  shadow_drop_lg="0 20px 25px -5px rgba(0, 0, 0, 0.4)",
57
-
58
- # Typography sizes
59
- text_lg="18px",
60
- text_md="16px",
61
- text_sm="14px",
62
- text_xs="12px",
63
-
64
- # Spacing
65
- spacing_lg="24px",
66
- spacing_md="16px",
67
- spacing_sm="12px",
68
-
69
- # Radius for rounded corners
70
- radius_lg="12px",
71
- radius_md="8px",
72
- radius_sm="6px",
73
  )
74
 
75
  return theme
 
13
  neutral_hue="slate",
14
  font=gr.themes.GoogleFont("Inter"),
15
  font_mono=gr.themes.GoogleFont("JetBrains Mono"),
16
+ )
17
+
18
+ # Apply custom styling with valid parameters only
19
+ theme.set(
20
+ # Buttons
21
+ button_primary_background_fill="*primary_600",
22
+ button_primary_background_fill_hover="*primary_500",
 
 
 
 
 
 
 
 
 
 
 
 
23
  button_primary_text_color="white",
24
 
25
+ button_secondary_background_fill="*secondary_600",
26
+ button_secondary_background_fill_hover="*secondary_500",
27
  button_secondary_text_color="white",
28
 
29
+ # Text colors for dark mode
 
 
 
 
30
  body_text_color="#f1f5f9",
 
31
  body_text_color_subdued="#cbd5e1",
32
 
33
+ # Backgrounds
34
+ body_background_fill="*neutral_950",
35
+ block_background_fill="*neutral_900",
36
+
37
+ # Borders
38
+ border_color_primary="*neutral_700",
39
 
40
  # Shadows for depth
41
  shadow_drop="0 10px 15px -3px rgba(0, 0, 0, 0.3)",
42
  shadow_drop_lg="0 20px 25px -5px rgba(0, 0, 0, 0.4)",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
43
  )
44
 
45
  return theme