Skip to content

Commit

Permalink
Update main.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Bersini authored Mar 24, 2024
1 parent 001a677 commit 8d14b0b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Cat_or_Dog/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,11 @@ def updatePixmap(self, path, pred=1000):
self.predLabel.setText(str(self.predictions[self.imgIndex]))
if pred < 0.5:
self.predLabel.setText(
f"I think it's a Cat! Confidence: {(0.5-pred)*200:.0f}%"
f"I think it's a Cat! Confidence: {(1.0-pred)*100:.0f}%"
)
elif pred > 0.5 and pred != 1000:
self.predLabel.setText(
f"I think it's a Dog! Confidence: {(-0.5+pred)*200:.0f}%"
f"I think it's a Dog! Confidence: {pred*100:.0f}%"
)
else:
self.predLabel.setText("I don't know yet ")
Expand Down

0 comments on commit 8d14b0b

Please sign in to comment.