Spaces:
Sleeping
Sleeping
Update streamlit_app.py
Browse files- streamlit_app.py +3 -3
streamlit_app.py
CHANGED
@@ -286,9 +286,9 @@ def predict_butterfly(image, threshold=0.5):
|
|
286 |
return predicted_class, confidence.item()
|
287 |
|
288 |
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
|
293 |
# UI Code
|
294 |
st.title("🦋 Liblikamaja ID/ Butterfly Identifier")
|
|
|
286 |
return predicted_class, confidence.item()
|
287 |
|
288 |
|
289 |
+
except Exception as e:
|
290 |
+
st.error(f"Prediction error: {str(e)}")
|
291 |
+
return None, None
|
292 |
|
293 |
# UI Code
|
294 |
st.title("🦋 Liblikamaja ID/ Butterfly Identifier")
|