Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -41,7 +41,7 @@ def detect_gingivitis(image, conf_threshold=0.5, iou_threshold=0.5):
|
|
| 41 |
# For now, return it for integration
|
| 42 |
|
| 43 |
# ✅ Return in same order as outputs
|
| 44 |
-
return img_swelling, img_redness, img_bleeding, has_gingivitis
|
| 45 |
|
| 46 |
|
| 47 |
def preprocess_image(image, max_size=1024, contrast_factor=1.05):
|
|
@@ -99,7 +99,7 @@ interface = gr.Interface(
|
|
| 99 |
gr.Image(label="Swelling Detection"),
|
| 100 |
gr.Image(label="Redness Detection"),
|
| 101 |
gr.Image(label="Bleeding Detection"),
|
| 102 |
-
gr.Label(label="Gingivitis
|
| 103 |
],
|
| 104 |
title="Gingivitis Detection (3 Models)",
|
| 105 |
description="Detect swelling, redness, and bleeding using 3 YOLO models.", )
|
|
|
|
| 41 |
# For now, return it for integration
|
| 42 |
|
| 43 |
# ✅ Return in same order as outputs
|
| 44 |
+
return img_swelling, img_redness, img_bleeding, "Gingivitis Detected" if has_gingivitis else "No Gingivitis Detected"
|
| 45 |
|
| 46 |
|
| 47 |
def preprocess_image(image, max_size=1024, contrast_factor=1.05):
|
|
|
|
| 99 |
gr.Image(label="Swelling Detection"),
|
| 100 |
gr.Image(label="Redness Detection"),
|
| 101 |
gr.Image(label="Bleeding Detection"),
|
| 102 |
+
gr.Label(label="Gingivitis Diagnosis")
|
| 103 |
],
|
| 104 |
title="Gingivitis Detection (3 Models)",
|
| 105 |
description="Detect swelling, redness, and bleeding using 3 YOLO models.", )
|