Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -342,7 +342,7 @@ def analyze_outfit(input_img):
|
|
| 342 |
# - Mid is worth 2/3 points (~66%)
|
| 343 |
# - Trash is worth 1/3 points (~33%)
|
| 344 |
|
| 345 |
-
final_score = (drip_score * 1) + (mid_score * 0.5) + (not_score * 0.
|
| 346 |
#final_score = min(max(final_score * 100, 0), 100) # Still keep within 0-100 range
|
| 347 |
# After calculating final_score but before categorization
|
| 348 |
#final_score = min(final_score * 1.1, 100) # Give a 10% boost to all scores
|
|
@@ -353,10 +353,10 @@ def analyze_outfit(input_img):
|
|
| 353 |
final_score = min(max(final_score, 0), 100)
|
| 354 |
|
| 355 |
# Now classify the category based on the final_score
|
| 356 |
-
if final_score >=
|
| 357 |
category_key = 'drippy'
|
| 358 |
score_label = "Drip Score"
|
| 359 |
-
elif final_score >=
|
| 360 |
category_key = 'mid'
|
| 361 |
score_label = "Mid Score"
|
| 362 |
else:
|
|
|
|
| 342 |
# - Mid is worth 2/3 points (~66%)
|
| 343 |
# - Trash is worth 1/3 points (~33%)
|
| 344 |
|
| 345 |
+
final_score = (drip_score * 1) + (mid_score * 0.5) + (not_score * 0.1)
|
| 346 |
#final_score = min(max(final_score * 100, 0), 100) # Still keep within 0-100 range
|
| 347 |
# After calculating final_score but before categorization
|
| 348 |
#final_score = min(final_score * 1.1, 100) # Give a 10% boost to all scores
|
|
|
|
| 353 |
final_score = min(max(final_score, 0), 100)
|
| 354 |
|
| 355 |
# Now classify the category based on the final_score
|
| 356 |
+
if final_score >= 50:
|
| 357 |
category_key = 'drippy'
|
| 358 |
score_label = "Drip Score"
|
| 359 |
+
elif final_score >= 20:
|
| 360 |
category_key = 'mid'
|
| 361 |
score_label = "Mid Score"
|
| 362 |
else:
|