vobecant commited on
Commit
621a3be
·
1 Parent(s): ad1f0d8

Initial commit.

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -182,14 +182,14 @@ def predict(input_img, cs_mapping):
182
  title = "Drive&Segment"
183
  description = 'Gradio Demo accompanying paper "Drive&Segment: Unsupervised Semantic Segmentation of Urban Scenes via Cross-modal Distillation"\nBecause of the CPU-only inference, it might take up to 20s for large images.\nRight now, I use the Segmenter model trained on nuScenes and with 256x256 patches (for the sake of speed).'
184
  # article = "<p style='text-align: center'><a href='TODO' target='_blank'>Project Page</a> | <a href='codelink' target='_blank'>Github</a></p>"
185
- examples = [['examples/img5.jpeg', True], ['examples/100.jpeg', True], ['examples/39076.jpeg', True],
186
- ['examples/img1.jpg', True]]
187
 
188
  # predict(examples[0])
189
 
190
  iface = gr.Interface(predict, [gr.inputs.Image(type='filepath'), gr.inputs.Checkbox(label="Cityscapes mapping")],
191
  "image", title=title, description=description,
192
- examples=examples, allow_screenshot=True)
193
  # iface = gr.Interface(predict, gr.inputs.Image(type='filepath'),
194
  # "image", title=title, description=description,
195
  # examples=examples)
 
182
  title = "Drive&Segment"
183
  description = 'Gradio Demo accompanying paper "Drive&Segment: Unsupervised Semantic Segmentation of Urban Scenes via Cross-modal Distillation"\nBecause of the CPU-only inference, it might take up to 20s for large images.\nRight now, I use the Segmenter model trained on nuScenes and with 256x256 patches (for the sake of speed).'
184
  # article = "<p style='text-align: center'><a href='TODO' target='_blank'>Project Page</a> | <a href='codelink' target='_blank'>Github</a></p>"
185
+ examples = [['examples/img5.jpeg', False], ['examples/100.jpeg', False], ['examples/39076.jpeg', False],
186
+ ['examples/img1.jpg', False]]
187
 
188
  # predict(examples[0])
189
 
190
  iface = gr.Interface(predict, [gr.inputs.Image(type='filepath'), gr.inputs.Checkbox(label="Cityscapes mapping")],
191
  "image", title=title, description=description,
192
+ examples=examples)
193
  # iface = gr.Interface(predict, gr.inputs.Image(type='filepath'),
194
  # "image", title=title, description=description,
195
  # examples=examples)