Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -57,7 +57,7 @@ def process_image(img):
|
|
57 |
img, img_bytes = resize_image(img)
|
58 |
weight, confidence = extract_weight_from_image(img)
|
59 |
|
60 |
-
if weight == "Not detected" or confidence <
|
61 |
return f"{weight} (Confidence: {confidence:.2f}%)", ist_time, img, None, gr.update(visible=True), gr.update(visible=False)
|
62 |
|
63 |
img_buffer = io.BytesIO(img_bytes)
|
|
|
57 |
img, img_bytes = resize_image(img)
|
58 |
weight, confidence = extract_weight_from_image(img)
|
59 |
|
60 |
+
if weight == "Not detected" or confidence < 70:
|
61 |
return f"{weight} (Confidence: {confidence:.2f}%)", ist_time, img, None, gr.update(visible=True), gr.update(visible=False)
|
62 |
|
63 |
img_buffer = io.BytesIO(img_bytes)
|