Update app.py
Browse files
app.py
CHANGED
|
@@ -54,7 +54,7 @@ def predict_image(input_img_pil):
|
|
| 54 |
# Assuming predictions is a 2-element array: [prob_cat, prob_dog]
|
| 55 |
pdog=float(predictions[0][0])
|
| 56 |
return {"dog":pdog,"cat":1-pdog}
|
| 57 |
-
|
| 58 |
except Exception as e:
|
| 59 |
# Catch any error, log it, and return it to the user in a visible format
|
| 60 |
error_message = f"CRITICAL RUNTIME ERROR: {str(e)}"
|
|
|
|
| 54 |
# Assuming predictions is a 2-element array: [prob_cat, prob_dog]
|
| 55 |
pdog=float(predictions[0][0])
|
| 56 |
return {"dog":pdog,"cat":1-pdog}
|
| 57 |
+
|
| 58 |
except Exception as e:
|
| 59 |
# Catch any error, log it, and return it to the user in a visible format
|
| 60 |
error_message = f"CRITICAL RUNTIME ERROR: {str(e)}"
|