Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -342,12 +342,12 @@ def analyze_outfit(input_img):
|
|
| 342 |
# - Mid is worth 2/3 points (~66%)
|
| 343 |
# - Trash is worth 1/3 points (~33%)
|
| 344 |
|
| 345 |
-
|
| 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
|
| 349 |
# Now map it to a 0–100 scale
|
| 350 |
-
|
| 351 |
|
| 352 |
# Clip it just in case (though it shouldn't exceed 100 now)
|
| 353 |
final_score = min(max(final_score, 0), 100)
|
|
|
|
| 342 |
# - Mid is worth 2/3 points (~66%)
|
| 343 |
# - Trash is worth 1/3 points (~33%)
|
| 344 |
|
| 345 |
+
raw_weighted_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
|
| 349 |
# Now map it to a 0–100 scale
|
| 350 |
+
final_score = raw_weighted_score * 100
|
| 351 |
|
| 352 |
# Clip it just in case (though it shouldn't exceed 100 now)
|
| 353 |
final_score = min(max(final_score, 0), 100)
|