Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -19,8 +19,8 @@ def inference(image: Image, size: str) -> Image:
|
|
19 |
result = model4.predict(image.convert('RGB'))
|
20 |
else:
|
21 |
result = model8.predict(image.convert('RGB'))
|
22 |
-
|
23 |
-
|
24 |
return result
|
25 |
|
26 |
|
|
|
19 |
result = model4.predict(image.convert('RGB'))
|
20 |
else:
|
21 |
result = model8.predict(image.convert('RGB'))
|
22 |
+
if torch.cuda.is_available():
|
23 |
+
torch.cuda.empty_cache()
|
24 |
return result
|
25 |
|
26 |
|