anonymous12321 commited on
Commit
a445c12
·
verified ·
1 Parent(s): f5f4281

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -11
app.py CHANGED
@@ -169,25 +169,27 @@ def classify_display(text):
169
  chips += f"<span class='output-chip' style='border-color:{color}80;color:{color}'>{label} ({prob:.0%})</span>"
170
  return f"<div style='display:flex;flex-wrap:wrap;gap:10px;justify-content:center;margin-top:10px'>{chips}</div>"
171
 
172
- # ---------------- CSS atualizado ----------------
 
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
  # ---------------- Gradio UI ----------------
192
  with gr.Blocks(css=custom_css, theme="gradio/soft") as demo:
193
  gr.Markdown("## 🏛️ **Council Matters Classifier – PT**")
 
169
  chips += f"<span class='output-chip' style='border-color:{color}80;color:{color}'>{label} ({prob:.0%})</span>"
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
  custom_css = """
175
+ body { background-color: #ffffff; color: #111; font-family: 'Inter', sans-serif; }
176
+ .gradio-container { background-color: #ffffff; color: #111; }
177
+ h2, h3 { text-align: center; color: #004b8d; font-weight: 600; }
178
+ textarea { background-color: #fafafa !important; color: #111 !important; border-radius: 10px !important; border: 1px solid #ccc !important; }
179
  button { background-color: #007aff !important; color: white !important; font-weight: 600 !important; border-radius: 8px !important; border: none !important; }
180
+ button:hover { background-color: #005fcc !important; }
181
+ .output-chip { background-color: #f4f4f4; padding: 5px 12px; border-radius: 8px; font-weight: 500; border: 1px solid #007aff33; color: #004b8d; }
182
+ .suggestion-box { background-color: #f7f9fc; border-radius: 10px; border: 1px solid #ccd8e0; padding: 10px; display: flex; align-items: center; justify-content: center; color: #111; margin-top: 25px; position: relative; overflow: scroll; }
183
+ .arrow-btn { width: 25px; height: 25px; font-size: 12px; padding: 0; background: none; border: none; color: #004b8d; cursor: pointer; font-weight: bold; }
184
+ .arrow-btn:hover { color: #002b5b; transform: scale(1.3); }
185
  .use-btn { background-color:#66b3ff !important; color:#000 !important; font-weight:600 !important; border-radius:6px !important; padding:3px 8px !important; margin-left:5px;}
186
  .use-btn:hover { background-color:#99ccff !important; }
187
  .suggestion-box .prev-btn { position: absolute; top: 5px; left: 5px; }
188
  .suggestion-box .next-btn { position: absolute; top: 5px; right: 5px; }
189
+ .suggestion-box .suggestion-text { width: 100%; text-align: center; border:none; background:none; color:#111; font-weight:500; padding-top:8px; overflow-y: scroll;}
190
  """
191
 
192
+
193
  # ---------------- Gradio UI ----------------
194
  with gr.Blocks(css=custom_css, theme="gradio/soft") as demo:
195
  gr.Markdown("## 🏛️ **Council Matters Classifier – PT**")