anonymous12321 commited on
Commit
0abfe20
·
verified ·
1 Parent(s): 9ed1cba

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +54 -49
app.py CHANGED
@@ -173,92 +173,97 @@ def classify_display(text):
173
 
174
  # ---------------- CSS refinado - tema claro agradável ----------------
175
  custom_css = """
176
- /* ======== Tema Claro – Council Topics Classifier ======== */
177
 
178
- /* Fundo principal */
179
- body, .gradio-container, .gr-interface, .gr-block, .wrap.svelte-1ipelgc {
180
  background-color: #ffffff !important;
181
- color: #222222 !important;
182
  }
183
 
184
- /* Cabeçalho e títulos */
185
- h1, h2, h3, h4, h5, h6, label, .gr-text-input label, .gr-textbox label {
186
- color: #222222 !important;
187
- font-weight: 600 !important;
 
 
188
  }
189
 
190
- /* Texto geral */
191
- p, span, div, .prose * {
192
  color: #333333 !important;
193
  }
194
 
195
- /* Inputs e caixas */
196
- textarea, input[type="text"], .gr-textbox, .gr-input, .gr-box, .gr-form, .gr-panel {
197
- background-color: #ffffff !important;
198
- color: #222222 !important;
199
  border: 1px solid #d1d5db !important;
200
- border-radius: 10px !important;
201
- box-shadow: 0 1px 4px rgba(0,0,0,0.06) !important;
202
  }
203
 
204
  /* Botões */
205
  button, .gr-button {
206
- background-color: #3b82f6 !important; /* azul suave */
207
  color: white !important;
208
- border-radius: 10px !important;
209
  font-weight: 600 !important;
 
210
  border: none !important;
211
- transition: background-color 0.2s ease-in-out !important;
212
  }
213
  button:hover, .gr-button:hover {
214
- background-color: #2563eb !important; /* azul mais escuro no hover */
215
  }
216
 
217
- /* Dropdowns */
218
- select {
219
- background-color: #ffffff !important;
220
- color: #222222 !important;
221
- border: 1px solid #d1d5db !important;
222
- border-radius: 10px !important;
 
223
  }
224
 
225
- /* Caixas de saída */
226
- .output-class, .output-text, .gr-highlighted, .output-box, .gr-panel.output {
227
- background-color: #f9fafb !important;
228
- color: #111827 !important;
229
- border: 1px solid #e5e7eb !important;
230
- border-radius: 10px !important;
231
- }
232
-
233
- /* Sugestões ou resultados */
234
- .suggestions-box, .gradio-container .gr-column.output {
235
- background-color: #ffffff !important;
236
- border: 1px solid #e5e7eb !important;
237
- box-shadow: 0 1px 4px rgba(0,0,0,0.04) !important;
238
  }
239
 
240
- /* Scrollbars subtis */
241
  ::-webkit-scrollbar {
242
  width: 8px;
243
  }
244
  ::-webkit-scrollbar-thumb {
245
- background-color: #d1d5db;
246
  border-radius: 4px;
247
  }
248
 
249
- /* Links */
250
- a {
251
- color: #2563eb !important;
252
  }
253
- a:hover {
254
- text-decoration: underline !important;
255
  }
256
 
257
- /* Ocultar bordas de debug / espaços */
258
- div[style*="background: var(--neutral-950)"] {
259
- background: none !important;
 
 
 
 
 
 
 
 
 
 
 
260
  }
261
 
 
262
  """
263
 
264
 
 
173
 
174
  # ---------------- CSS refinado - tema claro agradável ----------------
175
  custom_css = """
 
176
 
177
+ /* Fundo geral e texto */
178
+ body, .gradio-container, .gr-block, .wrap.svelte-1ipelgc {
179
  background-color: #ffffff !important;
180
+ color: #1e1e1e !important;
181
  }
182
 
183
+ /* Cabeçalho principal */
184
+ h1, h2, h3 {
185
+ text-align: center !important;
186
+ color: #1f77b4 !important;
187
+ font-weight: 700 !important;
188
+ margin-bottom: 1rem !important;
189
  }
190
 
191
+ /* Texto descritivo abaixo do título */
192
+ p, label, span {
193
  color: #333333 !important;
194
  }
195
 
196
+ /* Caixas de texto e inputs */
197
+ textarea, input[type="text"], .gr-textbox, .gr-input {
198
+ background-color: #f0f2f6 !important;
199
+ color: #1e1e1e !important;
200
  border: 1px solid #d1d5db !important;
201
+ border-radius: 8px !important;
202
+ padding: 0.6rem !important;
203
  }
204
 
205
  /* Botões */
206
  button, .gr-button {
207
+ background-color: #1f77b4 !important;
208
  color: white !important;
 
209
  font-weight: 600 !important;
210
+ border-radius: 8px !important;
211
  border: none !important;
212
+ transition: background-color 0.2s ease-in-out;
213
  }
214
  button:hover, .gr-button:hover {
215
+ background-color: #1663a6 !important;
216
  }
217
 
218
+ /* Caixas de saída (semelhantes às "segment-box" do demo) */
219
+ .output-class, .gr-panel.output, .output-box, .gr-highlighted, .gr-card {
220
+ background-color: #f0f2f6 !important;
221
+ border-left: 4px solid #1f77b4 !important;
222
+ border-radius: 8px !important;
223
+ padding: 1rem !important;
224
+ margin: 0.5rem 0 !important;
225
  }
226
 
227
+ /* Cabeçalhos de seções */
228
+ .gradio-container .gr-group label, .gradio-container .gr-panel label {
229
+ font-weight: 600 !important;
230
+ color: #1f77b4 !important;
 
 
 
 
 
 
 
 
 
231
  }
232
 
233
+ /* Scrollbars suaves */
234
  ::-webkit-scrollbar {
235
  width: 8px;
236
  }
237
  ::-webkit-scrollbar-thumb {
238
+ background-color: #c1c1c1;
239
  border-radius: 4px;
240
  }
241
 
242
+ /* Ajustes visuais */
243
+ .gradio-container .prose {
244
+ text-align: justify !important;
245
  }
246
+ .gradio-container .gr-column {
247
+ padding: 0.5rem !important;
248
  }
249
 
250
+ /* Modo escuro (automático) */
251
+ @media (prefers-color-scheme: dark) {
252
+ body, .gradio-container {
253
+ background-color: #262730 !important;
254
+ color: #e0e0e0 !important;
255
+ }
256
+ textarea, input, .gr-textbox {
257
+ background-color: #3a3b46 !important;
258
+ color: #e0e0e0 !important;
259
+ }
260
+ .output-class, .gr-panel.output {
261
+ background-color: #3a3b46 !important;
262
+ border-left: 4px solid #1f77b4 !important;
263
+ }
264
  }
265
 
266
+
267
  """
268
 
269