doevent commited on
Commit
c86c3e0
1 Parent(s): c317d1d

Added: empty_cache

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -25,6 +25,9 @@ def generate_caption(image, caption_type):
25
 
26
  caption = "\n".join(caption)
27
 
 
 
 
28
  return caption
29
 
30
 
 
25
 
26
  caption = "\n".join(caption)
27
 
28
+ if torch.cuda.is_available():
29
+ torch.cuda.empty_cache()
30
+
31
  return caption
32
 
33