Rodrigo_Cobo commited on
Commit
2323f51
1 Parent(s): 2c0045e

change depth output

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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 f'Images/Input-Test/0_d.jpg'
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="file", label="depth_estimation")
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