Spaces:
Running
Running
Commit
·
1435ea6
1
Parent(s):
0989743
Update app.py
Browse files
app.py
CHANGED
|
@@ -102,11 +102,11 @@ def format_score_with_style(score_str):
|
|
| 102 |
def format_binary_score(score):
|
| 103 |
percentage = int(score * 100)
|
| 104 |
if score < 0.4:
|
| 105 |
-
return f'<div style="background:linear-gradient(135deg, #065f46 0%, #047857 100%); color:#34d399; padding:
|
| 106 |
elif 0.4 <= score < 0.7:
|
| 107 |
-
return f'<div style="background:linear-gradient(135deg, #92400e 0%, #b45309 100%); color:#fbbf24; padding:
|
| 108 |
else:
|
| 109 |
-
return f'<div style="background:linear-gradient(135deg, #991b1b 0%, #b91c1c 100%); color:#fca5a5; padding:
|
| 110 |
|
| 111 |
def analyze_text(text):
|
| 112 |
if not text.strip():
|
|
|
|
| 102 |
def format_binary_score(score):
|
| 103 |
percentage = int(score * 100)
|
| 104 |
if score < 0.4:
|
| 105 |
+
return f'<div style="background:linear-gradient(135deg, #065f46 0%, #047857 100%); color:#34d399; padding:24px 0; border-radius:20px; text-align:center; font-weight:900; border:3px solid #10b981; font-size:24px; margin:24px 0; box-shadow:0 4px 24px rgba(0,0,0,0.3);">✅ Pass ({percentage}/100)</div>'
|
| 106 |
elif 0.4 <= score < 0.7:
|
| 107 |
+
return f'<div style="background:linear-gradient(135deg, #92400e 0%, #b45309 100%); color:#fbbf24; padding:24px 0; border-radius:20px; text-align:center; font-weight:900; border:3px solid #f59e0b; font-size:24px; margin:24px 0; box-shadow:0 4px 24px rgba(0,0,0,0.3);">⚠️ Warning ({percentage}/100)</div>'
|
| 108 |
else:
|
| 109 |
+
return f'<div style="background:linear-gradient(135deg, #991b1b 0%, #b91c1c 100%); color:#fca5a5; padding:24px 0; border-radius:20px; text-align:center; font-weight:900; border:3px solid #ef4444; font-size:24px; margin:24px 0; box-shadow:0 4px 24px rgba(0,0,0,0.3);">🚨 Fail ({percentage}/100)</div>'
|
| 110 |
|
| 111 |
def analyze_text(text):
|
| 112 |
if not text.strip():
|