vobecant commited on
Commit
20f349a
·
1 Parent(s): 999b149

Initial commit.

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -175,16 +175,17 @@ def predict(input_img, cs_mapping):
175
  title = "Drive&Segment"
176
  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).'
177
  # article = "<p style='text-align: center'><a href='TODO' target='_blank'>Project Page</a> | <a href='codelink' target='_blank'>Github</a></p>"
178
- examples = ['examples/img5.jpeg', 'examples/100.jpeg', 'examples/39076.jpeg', 'examples/img1.jpg']
 
179
 
180
  # predict(examples[0])
181
 
182
  iface = gr.Interface(predict, [gr.inputs.Image(type='filepath'), gr.inputs.Checkbox(label="Cityscapes mapping")],
183
  "image", title=title, description=description,
184
  examples=[examples, []])
185
- iface = gr.Interface(predict, gr.inputs.Image(type='filepath'),
186
- "image", title=title, description=description,
187
- examples=examples)
188
 
189
  # iface.launch(show_error=True, share=True)
190
  iface.launch(show_error=True)
 
175
  title = "Drive&Segment"
176
  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).'
177
  # article = "<p style='text-align: center'><a href='TODO' target='_blank'>Project Page</a> | <a href='codelink' target='_blank'>Github</a></p>"
178
+ examples = [['examples/img5.jpeg', True], ['examples/100.jpeg', True], ['examples/39076.jpeg', True],
179
+ ['examples/img1.jpg', True]]
180
 
181
  # predict(examples[0])
182
 
183
  iface = gr.Interface(predict, [gr.inputs.Image(type='filepath'), gr.inputs.Checkbox(label="Cityscapes mapping")],
184
  "image", title=title, description=description,
185
  examples=[examples, []])
186
+ # iface = gr.Interface(predict, gr.inputs.Image(type='filepath'),
187
+ # "image", title=title, description=description,
188
+ # examples=examples)
189
 
190
  # iface.launch(show_error=True, share=True)
191
  iface.launch(show_error=True)