merve HF staff commited on
Commit
6e99eb7
1 Parent(s): 2e34687

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -25,7 +25,10 @@ def dpt_large_inference(img):
25
 
26
  @spaces.GPU
27
  def infer(img):
28
- return dpt_large_inference(img), dpt_beit_inference(img), depth_anything_inference(img)
 
 
 
29
 
30
 
31
  css = """
 
25
 
26
  @spaces.GPU
27
  def infer(img):
28
+ if img is None:
29
+ return None, None, None
30
+ else:
31
+ return dpt_large_inference(img), dpt_beit_inference(img), depth_anything_inference(img)
32
 
33
 
34
  css = """