Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -18,7 +18,8 @@ def predict_image(image):
|
|
| 18 |
label = result[0]['label']
|
| 19 |
confidence = result[0]['score']
|
| 20 |
|
| 21 |
-
|
|
|
|
| 22 |
|
| 23 |
return label, confidence
|
| 24 |
|
|
|
|
| 18 |
label = result[0]['label']
|
| 19 |
confidence = result[0]['score']
|
| 20 |
|
| 21 |
+
prediction = 'female' if label == 'Label_0' else 'male'
|
| 22 |
+
print(f"Prediction: {prediction}, Confidence: {confidence}")
|
| 23 |
|
| 24 |
return label, confidence
|
| 25 |
|