Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -44,7 +44,7 @@ def base64_to_pil(b64_str):
|
|
| 44 |
|
| 45 |
|
| 46 |
# --- Main detection ---
|
| 47 |
-
def detect_gingivitis(image, conf=0.
|
| 48 |
image = preprocess(image)
|
| 49 |
|
| 50 |
sw_res = model_swelling.predict(image, conf=conf, iou=iou)
|
|
@@ -89,7 +89,7 @@ interface = gr.Interface(
|
|
| 89 |
fn=detect_gingivitis,
|
| 90 |
inputs=[
|
| 91 |
gr.Image(type="pil", label="Upload Image"),
|
| 92 |
-
gr.Slider(0, 1, value=0.
|
| 93 |
gr.Slider(0, 1, value=0.5, step=0.05, label="NMS IoU Threshold"),
|
| 94 |
],
|
| 95 |
outputs=[
|
|
|
|
| 44 |
|
| 45 |
|
| 46 |
# --- Main detection ---
|
| 47 |
+
def detect_gingivitis(image, conf=0.25, iou=0.5):
|
| 48 |
image = preprocess(image)
|
| 49 |
|
| 50 |
sw_res = model_swelling.predict(image, conf=conf, iou=iou)
|
|
|
|
| 89 |
fn=detect_gingivitis,
|
| 90 |
inputs=[
|
| 91 |
gr.Image(type="pil", label="Upload Image"),
|
| 92 |
+
gr.Slider(0, 1, value=0.5, step=0.05, label="Confidence Threshold"),
|
| 93 |
gr.Slider(0, 1, value=0.5, step=0.05, label="NMS IoU Threshold"),
|
| 94 |
],
|
| 95 |
outputs=[
|