Spaces:
Sleeping
Sleeping
Upload app.py
Browse files
app.py
CHANGED
@@ -18,7 +18,14 @@ def create_html_from_scores(word_scores):
|
|
18 |
def generate_progress_bar(score, label):
|
19 |
score = round(score, 2)
|
20 |
score_text = f"{score:.2f}" if score < 90 else "90"
|
21 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
bar_length = f"{(score / 90) * 100}%"
|
23 |
return f"""
|
24 |
<div class="progress-label">{label}:</div>
|
|
|
18 |
def generate_progress_bar(score, label):
|
19 |
score = round(score, 2)
|
20 |
score_text = f"{score:.2f}" if score < 90 else "90"
|
21 |
+
if score < 25:
|
22 |
+
bar_color = "#dc3545"
|
23 |
+
elif score < 50:
|
24 |
+
bar_color = "#dc6545"
|
25 |
+
elif score < 75:
|
26 |
+
bar_color = "#ffc107"
|
27 |
+
else:
|
28 |
+
bar_color = "#28a745"
|
29 |
bar_length = f"{(score / 90) * 100}%"
|
30 |
return f"""
|
31 |
<div class="progress-label">{label}:</div>
|