Update app.py
Browse files
app.py
CHANGED
|
@@ -53,7 +53,7 @@ def predict_image(input_img_pil):
|
|
| 53 |
# 4. Format the output for Gradio's Label component
|
| 54 |
# Assuming predictions is a 2-element array: [prob_cat, prob_dog]
|
| 55 |
|
| 56 |
-
return {"dog":predictions[0],"cat":1-predictions[0]}
|
| 57 |
|
| 58 |
except Exception as e:
|
| 59 |
# Catch any error, log it, and return it to the user in a visible format
|
|
|
|
| 53 |
# 4. Format the output for Gradio's Label component
|
| 54 |
# Assuming predictions is a 2-element array: [prob_cat, prob_dog]
|
| 55 |
|
| 56 |
+
return {"dog":predictions[0][0],"cat":1-predictions[0][0]}
|
| 57 |
|
| 58 |
except Exception as e:
|
| 59 |
# Catch any error, log it, and return it to the user in a visible format
|