Spaces:
Runtime error
Runtime error
JinHyeong99
commited on
Commit
·
6bd6b36
1
Parent(s):
87d6ca1
app.py
CHANGED
@@ -18,7 +18,8 @@ def segment_image(image):
|
|
18 |
result = logits.argmax(dim=1)[0]
|
19 |
result = result.cpu().detach().numpy()
|
20 |
|
21 |
-
result_image = Image.fromarray(result.astype(np.uint8), mode="P")
|
|
|
22 |
# 결과 배열 반환
|
23 |
return result_image
|
24 |
|
|
|
18 |
result = logits.argmax(dim=1)[0]
|
19 |
result = result.cpu().detach().numpy()
|
20 |
|
21 |
+
result_image = Image.fromarray(result.astype(np.uint8), mode="P").convert("RGB")
|
22 |
+
|
23 |
# 결과 배열 반환
|
24 |
return result_image
|
25 |
|