baconnier commited on
Commit
dfc2e38
1 Parent(s): 350e113

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +43 -24
app.py CHANGED
@@ -122,40 +122,29 @@ class GradioInterface:
122
  font-size: 1.2em;
123
  }
124
 
125
- /* Fix radio button styling */
126
  .gradio-radio {
127
- background: white !important;
128
- padding: 8px !important;
129
- border-radius: 4px !important;
130
  }
131
 
132
- /* Style individual radio options */
133
  .gradio-radio label {
134
- display: inline-flex !important;
135
  align-items: center !important;
136
- gap: 8px !important;
137
- padding: 4px 8px !important;
138
  border-radius: 4px !important;
139
  cursor: pointer !important;
140
- background: #f5f5f5 !important;
141
- border: 1px solid #ddd !important;
142
- }
143
-
144
- /* Style the radio input itself */
145
- .gradio-radio input[type="radio"] {
146
- width: 16px !important;
147
- height: 16px !important;
148
- margin: 0 !important;
149
- border: 2px solid #ddd !important;
150
- border-radius: 50% !important;
151
- appearance: auto !important;
152
- -webkit-appearance: auto !important;
153
  }
154
 
155
- /* Style selected radio */
156
- .gradio-radio input[type="radio"]:checked {
 
157
  border-color: #2196F3 !important;
158
- background-color: #2196F3 !important;
 
159
  }
160
 
161
  /* Container labels */
@@ -181,6 +170,36 @@ class GradioInterface:
181
  background: white !important;
182
  border-radius: 4px !important;
183
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
184
  """
185
 
186
  with gr.Blocks(css=custom_css, theme=gr.themes.Default()) as self.interface:
 
122
  font-size: 1.2em;
123
  }
124
 
125
+ /* Fix radio button visibility */
126
  .gradio-radio {
127
+ display: flex !important;
128
+ gap: 8px !important;
 
129
  }
130
 
131
+ /* Style for radio button labels */
132
  .gradio-radio label {
133
+ display: flex !important;
134
  align-items: center !important;
135
+ padding: 6px 12px !important;
136
+ border: 1px solid #ddd !important;
137
  border-radius: 4px !important;
138
  cursor: pointer !important;
139
+ background: white !important;
 
 
 
 
 
 
 
 
 
 
 
 
140
  }
141
 
142
+ /* Style for selected radio button */
143
+ .gradio-radio input[type="radio"]:checked + label {
144
+ background: #e3f2fd !important;
145
  border-color: #2196F3 !important;
146
+ color: #2196F3 !important;
147
+ font-weight: bold !important;
148
  }
149
 
150
  /* Container labels */
 
170
  background: white !important;
171
  border-radius: 4px !important;
172
  }
173
+
174
+ /* Make radio buttons more visible */
175
+ input[type="radio"] {
176
+ appearance: none !important;
177
+ -webkit-appearance: none !important;
178
+ width: 16px !important;
179
+ height: 16px !important;
180
+ border: 2px solid #ddd !important;
181
+ border-radius: 50% !important;
182
+ margin-right: 6px !important;
183
+ position: relative !important;
184
+ top: 2px !important;
185
+ }
186
+
187
+ input[type="radio"]:checked {
188
+ border-color: #2196F3 !important;
189
+ background: #2196F3 !important;
190
+ }
191
+
192
+ input[type="radio"]:checked::after {
193
+ content: "" !important;
194
+ width: 8px !important;
195
+ height: 8px !important;
196
+ background: white !important;
197
+ border-radius: 50% !important;
198
+ position: absolute !important;
199
+ top: 50% !important;
200
+ left: 50% !important;
201
+ transform: translate(-50%, -50%) !important;
202
+ }
203
  """
204
 
205
  with gr.Blocks(css=custom_css, theme=gr.themes.Default()) as self.interface: