Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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
|
| 179 |
-
body, .gradio-container, .gr-
|
| 180 |
background-color: #ffffff !important;
|
| 181 |
-
color: #
|
| 182 |
}
|
| 183 |
|
| 184 |
-
/* Cabeçalho
|
| 185 |
-
h1, h2, h3
|
| 186 |
-
|
| 187 |
-
|
|
|
|
|
|
|
| 188 |
}
|
| 189 |
|
| 190 |
-
/* Texto
|
| 191 |
-
p,
|
| 192 |
color: #333333 !important;
|
| 193 |
}
|
| 194 |
|
| 195 |
-
/*
|
| 196 |
-
textarea, input[type="text"], .gr-textbox, .gr-input
|
| 197 |
-
background-color: #
|
| 198 |
-
color: #
|
| 199 |
border: 1px solid #d1d5db !important;
|
| 200 |
-
border-radius:
|
| 201 |
-
|
| 202 |
}
|
| 203 |
|
| 204 |
/* Botões */
|
| 205 |
button, .gr-button {
|
| 206 |
-
background-color: #
|
| 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
|
| 212 |
}
|
| 213 |
button:hover, .gr-button:hover {
|
| 214 |
-
background-color: #
|
| 215 |
}
|
| 216 |
|
| 217 |
-
/*
|
| 218 |
-
|
| 219 |
-
background-color: #
|
| 220 |
-
|
| 221 |
-
border:
|
| 222 |
-
|
|
|
|
| 223 |
}
|
| 224 |
|
| 225 |
-
/*
|
| 226 |
-
.
|
| 227 |
-
|
| 228 |
-
color: #
|
| 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
|
| 241 |
::-webkit-scrollbar {
|
| 242 |
width: 8px;
|
| 243 |
}
|
| 244 |
::-webkit-scrollbar-thumb {
|
| 245 |
-
background-color: #
|
| 246 |
border-radius: 4px;
|
| 247 |
}
|
| 248 |
|
| 249 |
-
/*
|
| 250 |
-
|
| 251 |
-
|
| 252 |
}
|
| 253 |
-
|
| 254 |
-
|
| 255 |
}
|
| 256 |
|
| 257 |
-
/*
|
| 258 |
-
|
| 259 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
|