Rodrigo_Cobo
commited on
Commit
•
2323f51
1
Parent(s):
2c0045e
change depth output
Browse files
app.py
CHANGED
@@ -50,7 +50,7 @@ def calculate_depth(model_type, img):
|
|
50 |
out_im = Image.fromarray(formatted)
|
51 |
out_im.save("Images/Input-Test/0_d.jpg", "JPEG")
|
52 |
|
53 |
-
return
|
54 |
|
55 |
def wiggle_effect(slider):
|
56 |
|
@@ -68,7 +68,7 @@ with gr.Blocks() as demo:
|
|
68 |
inp = [gr.inputs.Dropdown(midas_models, default="MiDaS_small", label="Depth estimation model type")]
|
69 |
with gr.Row():
|
70 |
inp.append(gr.Image(type="pil", label="Input"))
|
71 |
-
out = gr.Image(type="
|
72 |
btn = gr.Button("Calculate depth")
|
73 |
btn.click(fn=calculate_depth, inputs=inp, outputs=out)
|
74 |
|
|
|
50 |
out_im = Image.fromarray(formatted)
|
51 |
out_im.save("Images/Input-Test/0_d.jpg", "JPEG")
|
52 |
|
53 |
+
return out_im
|
54 |
|
55 |
def wiggle_effect(slider):
|
56 |
|
|
|
68 |
inp = [gr.inputs.Dropdown(midas_models, default="MiDaS_small", label="Depth estimation model type")]
|
69 |
with gr.Row():
|
70 |
inp.append(gr.Image(type="pil", label="Input"))
|
71 |
+
out = gr.Image(type="pil", label="depth_estimation")
|
72 |
btn = gr.Button("Calculate depth")
|
73 |
btn.click(fn=calculate_depth, inputs=inp, outputs=out)
|
74 |
|