Update app.py
Browse files
app.py
CHANGED
|
@@ -75,7 +75,6 @@ def run_ven_engine(budget, dietary, company, purpose, noise):
|
|
| 75 |
match_pct = int(similarities[closest_persona] * 100)
|
| 76 |
review_text = str(top_match[col_review])[:160] + "..."
|
| 77 |
|
| 78 |
-
# --- VISUAL FIX ---
|
| 79 |
return f"""
|
| 80 |
<div style="background: white; border: 1px solid #e2e8f0; border-radius: 20px; padding: 24px; color: #000000 !important;">
|
| 81 |
<div style="display:flex; justify-content:space-between;">
|
|
@@ -89,21 +88,22 @@ def run_ven_engine(budget, dietary, company, purpose, noise):
|
|
| 89 |
</div>
|
| 90 |
</div>
|
| 91 |
<hr style="border:0; border-top:1px solid #cbd5e1; margin: 15px 0;">
|
| 92 |
-
|
| 93 |
<p style="color: #000000 !important; line-height:1.6; font-size: 16px; font-weight: 500; margin-top: 10px;">
|
| 94 |
<i style="color: #000000 !important;">"{review_text}"</i>
|
| 95 |
</p>
|
| 96 |
-
|
| 97 |
<div style="margin-top:15px; font-size:13px; font-weight:700; color:#2563eb !important;">Match Confidence: {match_pct}%</div>
|
| 98 |
</div>
|
| 99 |
"""
|
| 100 |
|
| 101 |
# ==========================================
|
| 102 |
-
# 3. APP UI & CSS FIX
|
| 103 |
# ==========================================
|
| 104 |
ven_css = """
|
| 105 |
-
|
| 106 |
-
|
|
|
|
|
|
|
|
|
|
| 107 |
h1, h2, h3, h4, h5, h6 { color: white !important; }
|
| 108 |
p, span, div, label { color: white; }
|
| 109 |
|
|
|
|
| 75 |
match_pct = int(similarities[closest_persona] * 100)
|
| 76 |
review_text = str(top_match[col_review])[:160] + "..."
|
| 77 |
|
|
|
|
| 78 |
return f"""
|
| 79 |
<div style="background: white; border: 1px solid #e2e8f0; border-radius: 20px; padding: 24px; color: #000000 !important;">
|
| 80 |
<div style="display:flex; justify-content:space-between;">
|
|
|
|
| 88 |
</div>
|
| 89 |
</div>
|
| 90 |
<hr style="border:0; border-top:1px solid #cbd5e1; margin: 15px 0;">
|
|
|
|
| 91 |
<p style="color: #000000 !important; line-height:1.6; font-size: 16px; font-weight: 500; margin-top: 10px;">
|
| 92 |
<i style="color: #000000 !important;">"{review_text}"</i>
|
| 93 |
</p>
|
|
|
|
| 94 |
<div style="margin-top:15px; font-size:13px; font-weight:700; color:#2563eb !important;">Match Confidence: {match_pct}%</div>
|
| 95 |
</div>
|
| 96 |
"""
|
| 97 |
|
| 98 |
# ==========================================
|
| 99 |
+
# 3. APP UI & CSS FIX (UNIVERSAL)
|
| 100 |
# ==========================================
|
| 101 |
ven_css = """
|
| 102 |
+
/* Fix for Hugging Face Spaces: Target the container, not just body */
|
| 103 |
+
.gradio-container { background-color: #0f172a !important; color: white !important; }
|
| 104 |
+
body { background-color: #0f172a !important; color: white !important; }
|
| 105 |
+
|
| 106 |
+
/* Force White Text for Headings/Labels */
|
| 107 |
h1, h2, h3, h4, h5, h6 { color: white !important; }
|
| 108 |
p, span, div, label { color: white; }
|
| 109 |
|