elhamb commited on
Commit
2a20d23
·
verified ·
1 Parent(s): e0de7ae

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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