blumenstiel commited on
Commit
364032f
Β·
1 Parent(s): f4fbac5

Update app

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -133,7 +133,7 @@ def predict_on_images(data_files: list, config_path: str, checkpoint: str, mask_
133
 
134
  model.eval()
135
  channels = [bands.index(b) for b in ['B04', 'B03', 'B02']] # BGR -> RGB
136
-
137
  # Reflect pad if not divisible by img_size
138
  original_h, original_w = input_data.shape[-2:]
139
  pad_h = img_size - (original_h % img_size)
@@ -268,4 +268,5 @@ Some example images are provided at the end of this page.
268
 
269
  inp_files.change(update_visibility, inp_files, timestamps)
270
 
271
- demo.launch(share=True, ssr_mode=False)
 
 
133
 
134
  model.eval()
135
  channels = [bands.index(b) for b in ['B04', 'B03', 'B02']] # BGR -> RGB
136
+
137
  # Reflect pad if not divisible by img_size
138
  original_h, original_w = input_data.shape[-2:]
139
  pad_h = img_size - (original_h % img_size)
 
268
 
269
  inp_files.change(update_visibility, inp_files, timestamps)
270
 
271
+ if __name__ == '__main__':
272
+ demo.launch()