Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -25,7 +25,8 @@ if uploaded_file is not None:
|
|
25 |
st.write("Classifying...")
|
26 |
results = classifier(image)
|
27 |
|
28 |
-
#
|
29 |
-
|
30 |
-
|
31 |
-
st.
|
|
|
|
25 |
st.write("Classifying...")
|
26 |
results = classifier(image)
|
27 |
|
28 |
+
# Get the label with the highest score
|
29 |
+
if results:
|
30 |
+
best_result = max(results, key=lambda x: x["score"])
|
31 |
+
st.subheader("Predicted Age Category:")
|
32 |
+
st.write(f"🟢 **{best_result['label']}** (Confidence: {best_result['score']:.4f})")
|