doevent commited on
Commit
1f67e13
1 Parent(s): d8aabe2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -20,6 +20,8 @@ def inference(image, size):
20
  result = model4.predict(image.convert('RGB'))
21
  else:
22
  result = model8.predict(image.convert('RGB'))
 
 
23
  return result
24
 
25
 
 
20
  result = model4.predict(image.convert('RGB'))
21
  else:
22
  result = model8.predict(image.convert('RGB'))
23
+ if torch.cuda.is_available():
24
+ torch.cuda.empty_cache()
25
  return result
26
 
27