adpro commited on
Commit
95d18d6
·
verified ·
1 Parent(s): eb4dae5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -3,6 +3,7 @@ from transformers import DPTFeatureExtractor, DPTForDepthEstimation
3
  import torch
4
  import numpy as np
5
  from PIL import Image
 
6
 
7
  # Load model and feature extractor
8
  feature_extractor = DPTFeatureExtractor.from_pretrained("Intel/dpt-large")
@@ -39,8 +40,8 @@ description = "Intel's DPT: Dense Prediction Transformer for depth estimation fr
39
 
40
  iface = gr.Interface(
41
  fn=process_image,
42
- inputs=gr.inputs.Image(type="pil", label="Input Image"),
43
- outputs=gr.outputs.Image(type="pil", label="Predicted Depth"),
44
  title=title,
45
  description=description,
46
  allow_flagging="never"
 
3
  import torch
4
  import numpy as np
5
  from PIL import Image
6
+ from pathlib import Path
7
 
8
  # Load model and feature extractor
9
  feature_extractor = DPTFeatureExtractor.from_pretrained("Intel/dpt-large")
 
40
 
41
  iface = gr.Interface(
42
  fn=process_image,
43
+ inputs=[input_image],
44
+ outputs=[predicted_depth],
45
  title=title,
46
  description=description,
47
  allow_flagging="never"