Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -164,8 +164,8 @@ def preprocess(input_image, do_remove_background, foreground_ratio):
|
|
164 |
image = resize_foreground(image, foreground_ratio)
|
165 |
image = fill_background(image)
|
166 |
|
167 |
-
torch.cuda.synchronize()
|
168 |
-
torch.cuda.empty_cache()
|
169 |
print("Background Removed")
|
170 |
else:
|
171 |
image = input_image
|
|
|
164 |
image = resize_foreground(image, foreground_ratio)
|
165 |
image = fill_background(image)
|
166 |
|
167 |
+
# torch.cuda.synchronize()
|
168 |
+
# torch.cuda.empty_cache()
|
169 |
print("Background Removed")
|
170 |
else:
|
171 |
image = input_image
|