dzmu commited on
Commit
f38a310
·
verified ·
1 Parent(s): f15ec02

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -332,7 +332,7 @@ def analyze_outfit(input_img):
332
  # - Mid is worth 2/3 points (~66%)
333
  # - Trash is worth 1/3 points (~33%)
334
 
335
- final_score = (drip_score * 1.0) + (mid_score * 0.80) + (not_score * 0.5)
336
 
337
  # Now map it to a 0–100 scale
338
  final_score = final_score * 100
@@ -341,10 +341,10 @@ def analyze_outfit(input_img):
341
  final_score = min(max(final_score, 0), 100)
342
 
343
  # Now classify the category based on the final_score
344
- if final_score >= 75:
345
  category_key = 'drippy'
346
  score_label = "Drip Score"
347
- elif final_score >= 40:
348
  category_key = 'mid'
349
  score_label = "Mid Score"
350
  else:
@@ -422,7 +422,7 @@ def analyze_outfit(input_img):
422
  category_html = f"""
423
  <div class='results-container'>
424
  <h2 class='result-category'>RATING: {category_label.upper()}</h2>
425
- <p class='result-score'>Overall Fit Rating: {percentage_score_str}/100</p>
426
  <p class='result-confidence'>Detected Item: {final_clothing_item.title()}</p>
427
  </div>
428
  """
 
332
  # - Mid is worth 2/3 points (~66%)
333
  # - Trash is worth 1/3 points (~33%)
334
 
335
+ final_score = (drip_score * 1.0) + (mid_score * 0.90) + (not_score * 0.5)
336
 
337
  # Now map it to a 0–100 scale
338
  final_score = final_score * 100
 
341
  final_score = min(max(final_score, 0), 100)
342
 
343
  # Now classify the category based on the final_score
344
+ if final_score >= 70:
345
  category_key = 'drippy'
346
  score_label = "Drip Score"
347
+ elif final_score >= 35:
348
  category_key = 'mid'
349
  score_label = "Mid Score"
350
  else:
 
422
  category_html = f"""
423
  <div class='results-container'>
424
  <h2 class='result-category'>RATING: {category_label.upper()}</h2>
425
+ <p class='result-score'>Overall Fit Rating: {percentage_score_str}/100%</p>
426
  <p class='result-confidence'>Detected Item: {final_clothing_item.title()}</p>
427
  </div>
428
  """