yuragoithf commited on
Commit
8c16ebc
·
1 Parent(s): d921f3c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -6
app.py CHANGED
@@ -1,14 +1,16 @@
 
 
 
1
  import gradio as gr
2
  import tensorflow as tf
3
- import gdown
4
  import urllib.request
5
- from PIL import Image
6
-
7
- import os
8
- import cv2
9
  import numpy as np
10
  import keras.backend as K
11
 
 
 
 
 
12
 
13
  #from tensorflow import keras
14
 
@@ -71,7 +73,8 @@ def gen_pred(img=inputs, model=seg_model):
71
  print(pred)
72
  # color_coverted = cv2.cvtColor(pred, cv2.COLOR_BGR2RGB)
73
  # pil_image = Image.fromarray(color_coverted)
74
- return "UI in developing process ..."
 
75
 
76
 
77
  title = "<h1 style='text-align: center;'>Semantic Segmentation</h1>"
 
1
+ import os
2
+ import cv2
3
+ import gdown
4
  import gradio as gr
5
  import tensorflow as tf
 
6
  import urllib.request
 
 
 
 
7
  import numpy as np
8
  import keras.backend as K
9
 
10
+ from PIL import Image
11
+ from matplotlib import pyplot as plt
12
+ %matplotlib inline
13
+
14
 
15
  #from tensorflow import keras
16
 
 
73
  print(pred)
74
  # color_coverted = cv2.cvtColor(pred, cv2.COLOR_BGR2RGB)
75
  # pil_image = Image.fromarray(color_coverted)
76
+ "UI in developing process ..."
77
+ return plt.imshow(pred, interpolation='catrom')
78
 
79
 
80
  title = "<h1 style='text-align: center;'>Semantic Segmentation</h1>"