Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -59,13 +59,13 @@ if uploaded_file is not None:
|
|
| 59 |
|
| 60 |
if results:
|
| 61 |
st.subheader("Top Predictions:")
|
| 62 |
-
|
| 63 |
-
|
| 64 |
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
else:
|
| 70 |
st.warning("⚠️ Internet Issue. Please try another image.")
|
| 71 |
# Option to classify another image
|
|
|
|
| 59 |
|
| 60 |
if results:
|
| 61 |
st.subheader("Top Predictions:")
|
| 62 |
+
for result in results[:4]:
|
| 63 |
+
st.write(f"**{result['label']}** - {result['score'] * 100:.2f}%")
|
| 64 |
|
| 65 |
+
label = results[0]['label']
|
| 66 |
+
confidence = results[0]['score'] * 100
|
| 67 |
+
st.success(f"**Most Likely Prediction:** {label}")
|
| 68 |
+
st.info(f"**Confidence:** {confidence:.2f}%")
|
| 69 |
else:
|
| 70 |
st.warning("⚠️ Internet Issue. Please try another image.")
|
| 71 |
# Option to classify another image
|