freealise commited on
Commit
83c5a54
1 Parent(s): fdc333a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -242,10 +242,10 @@ def get_mesh(image, blur_data, loadall):
242
  fnum = frame_selected
243
 
244
  if fnum < len(image)/2:
245
- blur_img = blur_image(image[fnum][0], image[fnum+len(image)/2][0], blur_data)
246
- gdepth = rgb2gray(image[fnum+len(image)/2][0])
247
  else:
248
- blur_img = blur_image(image[fnum-len(image)/2][0], image[fnum][0], blur_data)
249
  gdepth = rgb2gray(image[fnum][0])
250
 
251
  print('depth to gray - ok')
@@ -365,7 +365,7 @@ with gr.Blocks(css=css) as demo:
365
  input_url = gr.Textbox(value="./examples/streetview.mp4", label="URL")
366
  input_video = gr.Video(label="Input Video", format="mp4")
367
  input_url.change(fn=loadurl, inputs=[input_url], outputs=[input_video])
368
- output_frame = gr.Gallery(label="Frames", type='numpy', preview=True, columns=256)
369
  output_mask = gr.ImageEditor(interactive=True, transforms=(None,), eraser=gr.Eraser(), brush=gr.Brush(colors=['black', 'darkgray', 'gray', 'lightgray', 'white']), layers=True)
370
  submit = gr.Button("Submit")
371
  with gr.Column():
 
242
  fnum = frame_selected
243
 
244
  if fnum < len(image)/2:
245
+ blur_img = blur_image(image[fnum][0], image[fnum+int(len(image)/2)][0], blur_data)
246
+ gdepth = rgb2gray(image[fnum+int(len(image)/2)][0])
247
  else:
248
+ blur_img = blur_image(image[fnum-int(len(image)/2)][0], image[fnum][0], blur_data)
249
  gdepth = rgb2gray(image[fnum][0])
250
 
251
  print('depth to gray - ok')
 
365
  input_url = gr.Textbox(value="./examples/streetview.mp4", label="URL")
366
  input_video = gr.Video(label="Input Video", format="mp4")
367
  input_url.change(fn=loadurl, inputs=[input_url], outputs=[input_video])
368
+ output_frame = gr.Gallery(label="Frames", type='numpy', preview=True, rows=2, columns=8192)
369
  output_mask = gr.ImageEditor(interactive=True, transforms=(None,), eraser=gr.Eraser(), brush=gr.Brush(colors=['black', 'darkgray', 'gray', 'lightgray', 'white']), layers=True)
370
  submit = gr.Button("Submit")
371
  with gr.Column():