anonymous12321 commited on
Commit
4b06db0
·
verified ·
1 Parent(s): 0abfe20

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -93
app.py CHANGED
@@ -170,100 +170,22 @@ def classify_display(text):
170
  return f"<div style='display:flex;flex-wrap:wrap;gap:10px;justify-content:center;margin-top:10px'>{chips}</div>"
171
 
172
  # ---------------- CSS ----------------
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
 
 
170
  return f"<div style='display:flex;flex-wrap:wrap;gap:10px;justify-content:center;margin-top:10px'>{chips}</div>"
171
 
172
  # ---------------- CSS ----------------
 
 
173
  custom_css = """
174
+ body { background-color: #0c0c0c; color: #f1f1f1; font-family: 'Inter', sans-serif; }
175
+ .gradio-container { background-color: #0c0c0c; color: #f1f1f1; }
176
+ h2, h3 { text-align: center; color: #00b4ff; font-weight: 600; }
177
+ textarea { background-color: #181818 !important; color: #fff !important; border-radius: 10px !important; border: 1px solid #333 !important; }
178
+ button { background-color: #007aff !important; color: white !important; font-weight: 600 !important; border-radius: 8px !important; border: none !important; }
179
+ button:hover { background-color: #00aaff !important; }
180
+ .output-chip { background-color: #1a1a1a; padding: 5px 12px; border-radius: 8px; font-weight: 500; border: 1px solid #007aff33; }
181
+ .suggestion-box { background-color: #112f50; border-radius: 10px; border: 1px solid #1f3c5a; padding: 10px; display: flex; align-items: center; justify-content: center; color: #eee; margin-top: 25px; position: relative; overflow: scroll; } .arrow-btn { width: 25px; height: 25px; font-size: 12px; padding: 0; background: none; border: none; color: #e0f0ff; cursor: pointer; font-weight: bold; }
182
+
183
+ .arrow-btn:hover { color: #ffffff; transform: scale(1.3); }
184
+ .use-btn { background-color:#66b3ff !important; color:#000 !important; font-weight:600 !important; border-radius:6px !important; padding:3px 8px !important; margin-left:5px;}
185
+ .use-btn:hover { background-color:#99ccff !important; }
186
+ .suggestion-box .prev-btn { position: absolute; top: 5px; left: 5px; }
187
+ .suggestion-box .next-btn { position: absolute; top: 5px; right: 5px; }
188
+ .suggestion-box .suggestion-text { width: 100%; text-align: center; border:none; background:none; color:#eee; font-weight:500; padding-top:8px; overflow-y: scroll;}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
189
  """
190
 
191