Amitz244 commited on
Commit
fa793f8
·
verified ·
1 Parent(s): 99ad3e6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -101,10 +101,8 @@ def predict_percept(image):
101
  iqa_score = np.mean(iqa_score)
102
  min_iqa_pred = -6.52
103
  max_iqa_pred = 3.11
104
- max_iqa_score = 4.32
105
- min_iqa_score = 1
106
 
107
- normalized_iqa_score = ((iqa_score - min_iqa_pred) / (max_iqa_pred - min_iqa_pred)) * (max_iqa_score - min_iqa_score) + min_iqa_score
108
 
109
  emotion = idx2label[predicted]
110
  emoji = emotion_emoji.get(emotion, "❓")
@@ -117,7 +115,9 @@ example_images = [
117
  "https://img.freepik.com/free-photo/emotive-excited-female-with-dark-skin-crisp-hair-keeps-hands-clenched-fists-exclaims-with-positiveness-as-achieved-success-her-career-opens-mouth-widely-isolated-white-wall_273609-16443.jpg",
118
  "https://t4.ftcdn.net/jpg/01/18/44/59/360_F_118445958_NtP7tIsD0CBPyG7Uad7Z2KxVWrsfCPjP.jpg",
119
  "https://apnapestcontrol.ca/wp-content/uploads/2019/02/9.jpg",
120
- "https://images.pexels.com/photos/1107717/pexels-photo-1107717.jpeg?cs=srgb&dl=pexels-fotios-photos-1107717.jpg&fm=jpg"
 
 
121
  ]
122
 
123
  # Create Gradio interface with custom CSS
 
101
  iqa_score = np.mean(iqa_score)
102
  min_iqa_pred = -6.52
103
  max_iqa_pred = 3.11
 
 
104
 
105
+ normalized_iqa_score = ((iqa_score - min_iqa_pred) / (max_iqa_pred - min_iqa_pred))
106
 
107
  emotion = idx2label[predicted]
108
  emoji = emotion_emoji.get(emotion, "❓")
 
115
  "https://img.freepik.com/free-photo/emotive-excited-female-with-dark-skin-crisp-hair-keeps-hands-clenched-fists-exclaims-with-positiveness-as-achieved-success-her-career-opens-mouth-widely-isolated-white-wall_273609-16443.jpg",
116
  "https://t4.ftcdn.net/jpg/01/18/44/59/360_F_118445958_NtP7tIsD0CBPyG7Uad7Z2KxVWrsfCPjP.jpg",
117
  "https://apnapestcontrol.ca/wp-content/uploads/2019/02/9.jpg",
118
+ "https://images.pexels.com/photos/1107717/pexels-photo-1107717.jpeg?cs=srgb&dl=pexels-fotios-photos-1107717.jpg&fm=jpg",
119
+ "https://cdn.prod.website-files.com/60e4d0d0155e62117f4faef3/61fab92edbb1ccbc7d12c167_Brian-Matiash-Puppy.jpeg",
120
+ "https://www.slrlounge.com/wp-content/uploads/2014/12/fix-blurry-photos.jpg"
121
  ]
122
 
123
  # Create Gradio interface with custom CSS