Update app.py
Browse files
app.py
CHANGED
|
@@ -20,9 +20,15 @@ def img_pred(upload):
|
|
| 20 |
|
| 21 |
# Determine if tumor is present
|
| 22 |
if predicted_class == 0:
|
| 23 |
-
|
|
|
|
|
|
|
|
|
|
| 24 |
else:
|
| 25 |
-
|
|
|
|
|
|
|
|
|
|
| 26 |
|
| 27 |
# Return result with confidence
|
| 28 |
return f"The Model predicts: {result} with a confidence of {confidence:.2%}"
|
|
|
|
| 20 |
|
| 21 |
# Determine if tumor is present
|
| 22 |
if predicted_class == 0:
|
| 23 |
+
if confidence>20:
|
| 24 |
+
result = "No Tumor"
|
| 25 |
+
else:
|
| 26 |
+
result="Tumor Detected"
|
| 27 |
else:
|
| 28 |
+
if confidence>20:
|
| 29 |
+
result = "Tumor Detected"
|
| 30 |
+
else:
|
| 31 |
+
result = "No Tumor"
|
| 32 |
|
| 33 |
# Return result with confidence
|
| 34 |
return f"The Model predicts: {result} with a confidence of {confidence:.2%}"
|