Spaces:
Paused
Paused
Added: empty_cache
Browse files
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 |
|