Update app.py
Browse files
app.py
CHANGED
|
@@ -75,25 +75,26 @@ 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 |
-
# --- ืชืืงืื ืฆืืขืื
|
| 79 |
-
# ืืื ืืฉืื ืื ืืืืื: ืืืกืคืชื !important ืืฆืืขืื ืืฉืืืจืื
|
| 80 |
return f"""
|
| 81 |
-
<div style="background: white; border: 1px solid #e2e8f0; border-radius: 20px; padding: 24px; color:
|
| 82 |
<div style="display:flex; justify-content:space-between;">
|
| 83 |
<div>
|
| 84 |
-
<div style="font-size: 22px; font-weight: 800; color:
|
| 85 |
<div style="font-size: 14px; color: #333333 !important; font-weight: 600;">Match for: {closest_persona}</div>
|
| 86 |
</div>
|
| 87 |
<div style="text-align:right;">
|
| 88 |
-
<div style="font-size: 28px; font-weight: 900; color: #2563eb;">{top_match[col_rating]}</div>
|
| 89 |
-
<div style="font-size:12px; font-weight:bold; color:
|
| 90 |
</div>
|
| 91 |
</div>
|
| 92 |
<hr style="border:0; border-top:1px solid #cbd5e1; margin: 15px 0;">
|
| 93 |
|
| 94 |
-
<p style="color:
|
|
|
|
|
|
|
| 95 |
|
| 96 |
-
<div style="margin-top:15px; font-size:13px; font-weight:700; color:#2563eb;">Match Confidence: {match_pct}%</div>
|
| 97 |
</div>
|
| 98 |
"""
|
| 99 |
|
|
@@ -102,10 +103,12 @@ def run_ven_engine(budget, dietary, company, purpose, noise):
|
|
| 102 |
# ==========================================
|
| 103 |
ven_css = """
|
| 104 |
body { background-color: #0f172a !important; font-family: sans-serif !important; }
|
|
|
|
| 105 |
h1, h2, h3, h4, h5, h6 { color: white !important; }
|
| 106 |
p, span, div, label { color: white; }
|
| 107 |
-
|
| 108 |
-
.
|
|
|
|
| 109 |
"""
|
| 110 |
|
| 111 |
with gr.Blocks(css=ven_css, title="VEN Project") as demo:
|
|
|
|
| 75 |
match_pct = int(similarities[closest_persona] * 100)
|
| 76 |
review_text = str(top_match[col_review])[:160] + "..."
|
| 77 |
|
| 78 |
+
# --- ืชืืงืื ืฆืืขืื ืกืืคื ---
|
|
|
|
| 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;">
|
| 82 |
<div>
|
| 83 |
+
<div style="font-size: 22px; font-weight: 800; color: #000000 !important;">{top_match[col_name]}</div>
|
| 84 |
<div style="font-size: 14px; color: #333333 !important; font-weight: 600;">Match for: {closest_persona}</div>
|
| 85 |
</div>
|
| 86 |
<div style="text-align:right;">
|
| 87 |
+
<div style="font-size: 28px; font-weight: 900; color: #2563eb !important;">{top_match[col_rating]}</div>
|
| 88 |
+
<div style="font-size:12px; font-weight:bold; color: #000000 !important;">RATING</div>
|
| 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>"{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 |
|
|
|
|
| 103 |
# ==========================================
|
| 104 |
ven_css = """
|
| 105 |
body { background-color: #0f172a !important; font-family: sans-serif !important; }
|
| 106 |
+
/* ืืืงืกื ืืจืืฉื ืฉื ืืืคืืืงืฆืื ืืื ืืื */
|
| 107 |
h1, h2, h3, h4, h5, h6 { color: white !important; }
|
| 108 |
p, span, div, label { color: white; }
|
| 109 |
+
|
| 110 |
+
/* ืืื... ืืชืื ืืจืืืก ืืชืืฆืื ืื ืื ื ืืืจืืืื ืฉืืืจ */
|
| 111 |
+
.gradio-html p { color: #000000 !important; }
|
| 112 |
"""
|
| 113 |
|
| 114 |
with gr.Blocks(css=ven_css, title="VEN Project") as demo:
|