yuragoithf commited on
Commit
28f61dd
·
1 Parent(s): 9c7b1ec

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -13,13 +13,12 @@ estimator = pipeline("depth-estimation")
13
 
14
  def rb(img):
15
  result = estimator(img)
16
- return result
17
 
18
 
19
  inputs = gr.inputs.Image(type="pil", label="Upload an image")
20
- result = rb(inputs)
21
- result["depth"]
22
 
23
- # demo = gr.Interface(fn=estimator, inputs=inputs, outputs="json")
 
24
  # #demo = gr.Interface(fn=rb, inputs=inputs, outputs=result["depth"])
25
  # demo.launch()
 
13
 
14
  def rb(img):
15
  result = estimator(img)
16
+ return result["depth"]
17
 
18
 
19
  inputs = gr.inputs.Image(type="pil", label="Upload an image")
 
 
20
 
21
+
22
+ demo = gr.Interface(fn=rb, inputs=inputs, outputs=rb(inputs))
23
  # #demo = gr.Interface(fn=rb, inputs=inputs, outputs=result["depth"])
24
  # demo.launch()