ysharma HF staff commited on
Commit
95bbbe5
β€’
1 Parent(s): 9522496

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -54,9 +54,11 @@ def remove_background(result):
54
  elif isinstance(result, str):
55
  result = Image.open(result)
56
  result = rembg.remove(result)
57
- else:
58
- # Convert the NumPy array to a PIL Image
59
- result = Image.fromarray(result)
 
 
60
  return result
61
 
62
 
 
54
  elif isinstance(result, str):
55
  result = Image.open(result)
56
  result = rembg.remove(result)
57
+ elif isinstance(result, numpy.ndarray):
58
+ print('here ELIF 2')
59
+ # Convert the NumPy array to a PIL Image
60
+ result = Image.fromarray(result)
61
+ result = rembg.remove(result)
62
  return result
63
 
64