Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -286,8 +286,7 @@ def blur_image(image, depth, blur_data):
|
|
286 |
blur_frame[blur_mask>0] = blur[blur_mask>0]
|
287 |
j = j + 1
|
288 |
|
289 |
-
|
290 |
-
return image
|
291 |
|
292 |
def loadurl(url):
|
293 |
return url
|
@@ -348,6 +347,7 @@ with gr.Blocks(css=css) as demo:
|
|
348 |
output_depth = gr.Gallery(label="Depth", type='numpy', preview=True, columns=8192, interactive=False)
|
349 |
output_frame.select(fn=select_frame, inputs=None, outputs=[output_depth], show_progress='hidden')
|
350 |
output_depth.select(fn=select_frame, inputs=None, outputs=[output_frame], show_progress='hidden')
|
|
|
351 |
submit = gr.Button("Submit")
|
352 |
with gr.Column():
|
353 |
model_type = gr.Dropdown([("small", "vits"), ("base", "vitb"), ("large", "vitl")], type="value", value="vits", label='Model Type')
|
@@ -492,7 +492,7 @@ with gr.Blocks(css=css) as demo:
|
|
492 |
|
493 |
submit.click(on_submit, inputs=[input_video, model_type], outputs=[processed_video, processed_zip, output_frame, output_depth])
|
494 |
render.click(partial(get_mesh), inputs=[output_frame, output_depth], outputs=[result])
|
495 |
-
blur_btn.click(blur_image, inputs=[output_frame, output_depth, txt_in], outputs=[
|
496 |
|
497 |
example_files = os.listdir('examples')
|
498 |
example_files.sort()
|
|
|
286 |
blur_frame[blur_mask>0] = blur[blur_mask>0]
|
287 |
j = j + 1
|
288 |
|
289 |
+
return blur_frame
|
|
|
290 |
|
291 |
def loadurl(url):
|
292 |
return url
|
|
|
347 |
output_depth = gr.Gallery(label="Depth", type='numpy', preview=True, columns=8192, interactive=False)
|
348 |
output_frame.select(fn=select_frame, inputs=None, outputs=[output_depth], show_progress='hidden')
|
349 |
output_depth.select(fn=select_frame, inputs=None, outputs=[output_frame], show_progress='hidden')
|
350 |
+
output_blur = gr.ImageEitor(label="Blurred", type='numpy')
|
351 |
submit = gr.Button("Submit")
|
352 |
with gr.Column():
|
353 |
model_type = gr.Dropdown([("small", "vits"), ("base", "vitb"), ("large", "vitl")], type="value", value="vits", label='Model Type')
|
|
|
492 |
|
493 |
submit.click(on_submit, inputs=[input_video, model_type], outputs=[processed_video, processed_zip, output_frame, output_depth])
|
494 |
render.click(partial(get_mesh), inputs=[output_frame, output_depth], outputs=[result])
|
495 |
+
blur_btn.click(blur_image, inputs=[output_frame, output_depth, txt_in], outputs=[output_blur])
|
496 |
|
497 |
example_files = os.listdir('examples')
|
498 |
example_files.sort()
|