yuragoithf commited on
Commit
8af4e5b
·
1 Parent(s): 11640a4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -65,7 +65,7 @@ def gen_pred(img=inputs, model=seg_model):
65
  img = tf.expand_dims(img, axis=0)
66
  pred = model.predict(img)
67
  pred = np.squeeze(pred, axis=0)
68
- return img, pred
69
 
70
 
71
  title = "<h1 style='text-align: center;'>Semantic Segmentation</h1>"
@@ -74,7 +74,7 @@ description = "Upload an image and get prediction mask"
74
 
75
  gr.Interface(fn=gen_pred,
76
  inputs=inputs,
77
- outputs="image",
78
  title=title,
79
  examples=[["003e2c95d.jpg"], ["003b50a15.jpg"], ["003b48a9e.jpg"], ["0038cbe45.jpg"], ["00371aa92.jpg"]],
80
  # css=css_code,
 
65
  img = tf.expand_dims(img, axis=0)
66
  pred = model.predict(img)
67
  pred = np.squeeze(pred, axis=0)
68
+ return pred
69
 
70
 
71
  title = "<h1 style='text-align: center;'>Semantic Segmentation</h1>"
 
74
 
75
  gr.Interface(fn=gen_pred,
76
  inputs=inputs,
77
+ outputs=gr.components.Image(),
78
  title=title,
79
  examples=[["003e2c95d.jpg"], ["003b50a15.jpg"], ["003b48a9e.jpg"], ["0038cbe45.jpg"], ["00371aa92.jpg"]],
80
  # css=css_code,