Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -99,8 +99,9 @@ def inference(video_path, input_tag, progress=gr.Progress()):
|
|
| 99 |
frame_caption = ' '.join([f"Second {i+1}:{j}.\n" for i,j in enumerate(frame_caption_list)])
|
| 100 |
dense_caption = ' '.join([f"Second {i+1} : {j}.\n" for (i,j) in dense_caption_list])
|
| 101 |
del data, action_tensor, original_image, image,tmp,tmpa
|
| 102 |
-
torch.cuda.
|
| 103 |
-
|
|
|
|
| 104 |
|
| 105 |
return ' | '.join(tag_1),' | '.join(tag_2), frame_caption, dense_caption, synth_caption[0], gr.update(interactive = True), ','.join(set(prediction_list))
|
| 106 |
|
|
|
|
| 99 |
frame_caption = ' '.join([f"Second {i+1}:{j}.\n" for i,j in enumerate(frame_caption_list)])
|
| 100 |
dense_caption = ' '.join([f"Second {i+1} : {j}.\n" for (i,j) in dense_caption_list])
|
| 101 |
del data, action_tensor, original_image, image,tmp,tmpa
|
| 102 |
+
if torch.cuda.is_available():
|
| 103 |
+
torch.cuda.empty_cache()
|
| 104 |
+
torch.cuda.ipc_collect()
|
| 105 |
|
| 106 |
return ' | '.join(tag_1),' | '.join(tag_2), frame_caption, dense_caption, synth_caption[0], gr.update(interactive = True), ','.join(set(prediction_list))
|
| 107 |
|