yuragoithf commited on
Commit
6268899
·
1 Parent(s): de1af76

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -13,12 +13,12 @@ estimator = pipeline("depth-estimation")
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=estimator, inputs=inputs, outputs=gr.Label())
23
  #demo = gr.Interface(fn=rb, inputs=inputs, outputs=result["depth"])
24
  demo.launch()
 
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
 
21
 
22
+ demo = gr.Interface(fn=estimator, inputs=inputs, outputs="json")
23
  #demo = gr.Interface(fn=rb, inputs=inputs, outputs=result["depth"])
24
  demo.launch()