doevent commited on
Commit
357cf6f
1 Parent(s): e198db2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -19,6 +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
  return result
23
 
24
 
 
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