From 8d14b0baa31ea9b38d1d2fe99a5c5f1850b5d66a Mon Sep 17 00:00:00 2001 From: Bersini <40536426+Bersini@users.noreply.github.com> Date: Sun, 24 Mar 2024 16:04:10 +0100 Subject: [PATCH] Update main.py --- Cat_or_Dog/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cat_or_Dog/main.py b/Cat_or_Dog/main.py index 11253ff..a24d7b0 100644 --- a/Cat_or_Dog/main.py +++ b/Cat_or_Dog/main.py @@ -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 ")