yuragoithf commited on
Commit
00c13b0
·
1 Parent(s): 7ffb813

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -70,9 +70,10 @@ def gen_pred(img=inputs, model=seg_model):
70
  pred = np.squeeze(pred, axis=0)
71
  print(pred)
72
  # color_coverted = cv2.cvtColor(pred, cv2.COLOR_BGR2RGB)
73
- pil_image = Image.fromarray(pred)
 
74
  "UI in developing process ..."
75
- return pil_image
76
 
77
 
78
  title = "<h1 style='text-align: center;'>Semantic Segmentation</h1>"
 
70
  pred = np.squeeze(pred, axis=0)
71
  print(pred)
72
  # color_coverted = cv2.cvtColor(pred, cv2.COLOR_BGR2RGB)
73
+ # pil_image = Image.fromarray(pred)
74
+ PIL_image = Image.fromarray(pred.astype('uint8'), 'RGB')
75
  "UI in developing process ..."
76
+ return PIL_image
77
 
78
 
79
  title = "<h1 style='text-align: center;'>Semantic Segmentation</h1>"