kitooo commited on
Commit
aaaedd1
·
verified ·
1 Parent(s): 6bc05db

updated app

Browse files
Files changed (1) hide show
  1. app.py +1 -9
app.py CHANGED
@@ -26,18 +26,10 @@ def segment_sidewalk(image):
26
  save_image(prediction, 'mask.png', cmap='gray')
27
  return Image.open('image.png'), Image.open('mask.png'), Image.open('prob.png')
28
 
29
- # def save_image(image, path, **kwargs):
30
- # plt.figure(figsize=(8, 8))
31
- # plt.imshow(image, interpolation='nearest', **kwargs)
32
- # plt.axis('off')
33
- # plt.tight_layout()
34
- # plt.savefig(path, bbox_inches='tight', pad_inches=0)
35
- # plt.close()
36
-
37
  with gr.Blocks() as demo:
38
  with gr.Row():
39
  with gr.Column():
40
- image_input = gr.Image(type='pil', label='TIFF Image')
41
  button = gr.Button('Get Sidewalk Mask')
42
  with gr.Column():
43
  mask = gr.Image(type='pil', label='Predicted Mask')
 
26
  save_image(prediction, 'mask.png', cmap='gray')
27
  return Image.open('image.png'), Image.open('mask.png'), Image.open('prob.png')
28
 
 
 
 
 
 
 
 
 
29
  with gr.Blocks() as demo:
30
  with gr.Row():
31
  with gr.Column():
32
+ image_input = gr.Image(type='pil', label='Original TIFF Image')
33
  button = gr.Button('Get Sidewalk Mask')
34
  with gr.Column():
35
  mask = gr.Image(type='pil', label='Predicted Mask')