AshanGimhana commited on
Commit
9dc646a
·
verified ·
1 Parent(s): e3c2669

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -263,7 +263,12 @@ def process_image(uploaded_image):
263
 
264
  # Predicting the age
265
  predicted_age = predict_age(uploaded_image)
266
- target_age = predicted_age + 2
 
 
 
 
 
267
 
268
  # Aligning the face in the uploaded image
269
  aligned_image = run_alignment(uploaded_image)
 
263
 
264
  # Predicting the age
265
  predicted_age = predict_age(uploaded_image)
266
+
267
+ if predicted_age >= 48:
268
+ target_age =35+1
269
+
270
+ else:
271
+ target_age = predicted_age + 2
272
 
273
  # Aligning the face in the uploaded image
274
  aligned_image = run_alignment(uploaded_image)