johnnv commited on
Commit
50c5448
1 Parent(s): 581ca56

add image to outputs

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -162,7 +162,7 @@ def main(image):
162
  mask_colorized = colorize(mask)
163
  fig = image_with_mask(img, mask)
164
 
165
- return categories_map(mask), mask_colorized, fig
166
 
167
 
168
  title = 'SegFormer (b3) - CCAgT dataset'
@@ -188,6 +188,7 @@ demo = gr.Interface(
188
  inputs=[gr.Image()],
189
  outputs=[
190
  gr.Plot(label='Categories map'),
 
191
  gr.Image(label='Mask'),
192
  gr.Plot(label='Image with mask'),
193
  ],
 
162
  mask_colorized = colorize(mask)
163
  fig = image_with_mask(img, mask)
164
 
165
+ return categories_map(mask), Image.fromarray(img), mask_colorized, fig
166
 
167
 
168
  title = 'SegFormer (b3) - CCAgT dataset'
 
188
  inputs=[gr.Image()],
189
  outputs=[
190
  gr.Plot(label='Categories map'),
191
+ gr.Image(label='Image'),
192
  gr.Image(label='Mask'),
193
  gr.Plot(label='Image with mask'),
194
  ],