sajid1085 commited on
Commit
8a23aa3
1 Parent(s): 378ae42

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -15,13 +15,13 @@ def classify_image(image, top_k):
15
  age_result = {result['label']: result['score'] for result in age_result[:min(int(top_k), 8)]}
16
  emotion_result = {result['label']: result['score'] for result in emotion_result[:min(int(top_k), 7)]}
17
 
18
- # Add some text comment to it lol
19
  comment = text_comment(list(age_result.keys())[0])
20
 
21
  # Returning the classification result
22
  return age_result, comment, emotion_result
23
 
24
- # Snarky comment based on age
25
  def text_comment(pred_class):
26
  match pred_class:
27
  case "3-9":
 
15
  age_result = {result['label']: result['score'] for result in age_result[:min(int(top_k), 8)]}
16
  emotion_result = {result['label']: result['score'] for result in emotion_result[:min(int(top_k), 7)]}
17
 
18
+
19
  comment = text_comment(list(age_result.keys())[0])
20
 
21
  # Returning the classification result
22
  return age_result, comment, emotion_result
23
 
24
+ # comment based on age
25
  def text_comment(pred_class):
26
  match pred_class:
27
  case "3-9":