Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -39,19 +39,16 @@ def inference(image, input_label, model_choice):
|
|
| 39 |
score1 = scores[0]
|
| 40 |
img1 = image.copy()
|
| 41 |
img1[mask1, 0] = 255
|
| 42 |
-
img1[y-10:y+10, x-10:x+10, 1] = 255
|
| 43 |
img1[y-10:y+10, x-10:x+10, 2] = 255
|
| 44 |
mask2 = masks[1]
|
| 45 |
score2 = scores[1]
|
| 46 |
img2 = image.copy()
|
| 47 |
img2[mask2, 0] = 255
|
| 48 |
-
img2[y-10:y+10, x-10:x+10, 1] = 255
|
| 49 |
img2[y-10:y+10, x-10:x+10, 2] = 255
|
| 50 |
mask3 = masks[2]
|
| 51 |
score3 = scores[2]
|
| 52 |
img3 = image.copy()
|
| 53 |
img3[mask3, 0] = 255
|
| 54 |
-
img3[y-10:y+10, x-10:x+10, 1] = 255
|
| 55 |
img3[y-10:y+10, x-10:x+10, 2] = 255
|
| 56 |
return f"{score1}", img1, f"{score2}", img2, f"{score3}", img3
|
| 57 |
|
|
|
|
| 39 |
score1 = scores[0]
|
| 40 |
img1 = image.copy()
|
| 41 |
img1[mask1, 0] = 255
|
|
|
|
| 42 |
img1[y-10:y+10, x-10:x+10, 2] = 255
|
| 43 |
mask2 = masks[1]
|
| 44 |
score2 = scores[1]
|
| 45 |
img2 = image.copy()
|
| 46 |
img2[mask2, 0] = 255
|
|
|
|
| 47 |
img2[y-10:y+10, x-10:x+10, 2] = 255
|
| 48 |
mask3 = masks[2]
|
| 49 |
score3 = scores[2]
|
| 50 |
img3 = image.copy()
|
| 51 |
img3[mask3, 0] = 255
|
|
|
|
| 52 |
img3[y-10:y+10, x-10:x+10, 2] = 255
|
| 53 |
return f"{score1}", img1, f"{score2}", img2, f"{score3}", img3
|
| 54 |
|