Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -27,7 +27,7 @@ if uploaded_image is not None:
|
|
| 27 |
image = image.convert('RGB') # Convert to RGB format
|
| 28 |
predicted_label, probability = classify_image(image) # Pass the image to your function
|
| 29 |
st.write("Classified as (using Pillow):")
|
| 30 |
-
st.write(f"- {
|
| 31 |
except Exception as e:
|
| 32 |
st.error(f"Error using Pillow for fallback: {e}")
|
| 33 |
else:
|
|
|
|
| 27 |
image = image.convert('RGB') # Convert to RGB format
|
| 28 |
predicted_label, probability = classify_image(image) # Pass the image to your function
|
| 29 |
st.write("Classified as (using Pillow):")
|
| 30 |
+
st.write(f"- {predicted_label}, {probability:.4f}")
|
| 31 |
except Exception as e:
|
| 32 |
st.error(f"Error using Pillow for fallback: {e}")
|
| 33 |
else:
|