codic commited on
Commit
832ddab
·
verified ·
1 Parent(s): e48a831

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -14,7 +14,6 @@ model = DPTForDepthEstimation.from_pretrained("Intel/dpt-large")
14
 
15
  # Background removal API client
16
  client = Client("not-lain/background-removal")
17
-
18
  def process_image(image_path, depth_map_path=None):
19
  image_path = Path(image_path)
20
  image_raw = Image.open(image_path)
@@ -25,7 +24,7 @@ def process_image(image_path, depth_map_path=None):
25
 
26
  # Step 1: Perform background removal
27
  result = client.predict(
28
- f=image_path, # Directly use the image path
29
  api_name="/png"
30
  )
31
 
 
14
 
15
  # Background removal API client
16
  client = Client("not-lain/background-removal")
 
17
  def process_image(image_path, depth_map_path=None):
18
  image_path = Path(image_path)
19
  image_raw = Image.open(image_path)
 
24
 
25
  # Step 1: Perform background removal
26
  result = client.predict(
27
+ f=str(image_path), # Convert Path to string
28
  api_name="/png"
29
  )
30