lorn666 commited on
Commit
214658f
·
verified ·
1 Parent(s): 0963be5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +23 -41
app.py CHANGED
@@ -1,52 +1,34 @@
1
  import gradio as gr
2
  import os
3
- from src.assets import custom_css
4
 
5
- # Additional CSS to override remote Space styling
6
- override_css = custom_css + """
7
- /* Force override remote Space styling with higher specificity */
8
- div.gradio-container .gradio-dataframe th,
9
- div.gradio-container div.gradio-dataframe th,
10
- .gr-box .gradio-dataframe th,
11
- .gr-form .gradio-dataframe th,
12
- body .gradio-dataframe th,
13
- html .gradio-dataframe th {
14
- background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
15
- color: white !important;
16
- font-weight: 600 !important;
17
- border: 1px solid rgba(255,255,255,0.2) !important;
18
  }
19
 
20
- /* Override hover effects */
21
- div.gradio-container .gradio-dataframe th:hover,
22
- div.gradio-container div.gradio-dataframe th:hover,
23
- .gr-box .gradio-dataframe th:hover,
24
- body .gradio-dataframe th:hover {
25
- background: linear-gradient(135deg, #5a6fd8 0%, #6b4190 100%) !important;
26
- transform: translateY(-1px) !important;
27
- box-shadow: 0 3px 6px rgba(0,0,0,0.15) !important;
28
  }
29
 
30
- /* Override table row hover */
31
- div.gradio-container .gradio-dataframe tbody tr:hover,
32
- body .gradio-dataframe tbody tr:hover {
33
- background-color: #e3f2fd !important;
 
34
  }
35
 
36
- /* Additional React table styling overrides */
37
- .leaderboard-table-container .header-cell,
38
- .leaderboard-table .header-cell,
39
- div .header-cell,
40
- body .header-cell {
41
- background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
42
- color: white !important;
43
- }
44
-
45
- .leaderboard-table-container .header-cell:hover,
46
- .leaderboard-table .header-cell:hover,
47
- div .header-cell:hover,
48
- body .header-cell:hover {
49
- background: linear-gradient(135deg, #5a6fd8 0%, #6b4190 100%) !important;
50
  }
51
  """
52
 
@@ -72,7 +54,7 @@ except Exception as e:
72
  load_error = str(e)
73
  print(f"[ERROR] Failed to load remote Space: {load_error}")
74
 
75
- with gr.Blocks(css=override_css) as demo:
76
  if remote_space is not None:
77
  remote_space.render()
78
  else:
 
1
  import gradio as gr
2
  import os
 
3
 
4
+ # CSS to change orange UI elements to blue
5
+ blue_ui_css = """
6
+ /* Change orange checkboxes and radio buttons to blue */
7
+ .gradio-container input[type="checkbox"]:checked,
8
+ .gradio-container .gr-checkbox input:checked + .checkmark,
9
+ .gradio-container .gr-checkboxgroup input:checked + .checkmark {
10
+ background-color: #667eea !important;
11
+ border-color: #667eea !important;
 
 
 
 
 
12
  }
13
 
14
+ .gradio-container input[type="radio"]:checked,
15
+ .gradio-container .gr-radio input:checked + .checkmark,
16
+ .gradio-container .gr-radio input:checked::before {
17
+ background-color: #667eea !important;
18
+ border-color: #667eea !important;
 
 
 
19
  }
20
 
21
+ /* Override any orange accent colors */
22
+ .gradio-container .gr-checkbox input:checked,
23
+ .gradio-container .gr-checkboxgroup input:checked,
24
+ .gradio-container .gr-radio input:checked {
25
+ accent-color: #667eea !important;
26
  }
27
 
28
+ /* Target specific Gradio checkbox styling */
29
+ .gradio-container label input[type="checkbox"]:checked::before,
30
+ .gradio-container label input[type="radio"]:checked::before {
31
+ background-color: #667eea !important;
 
 
 
 
 
 
 
 
 
 
32
  }
33
  """
34
 
 
54
  load_error = str(e)
55
  print(f"[ERROR] Failed to load remote Space: {load_error}")
56
 
57
+ with gr.Blocks(css=blue_ui_css) as demo:
58
  if remote_space is not None:
59
  remote_space.render()
60
  else: