Spaces:
Running
on
Zero
Running
on
Zero
Antoni Bigata
commited on
Commit
·
506e646
1
Parent(s):
4ef25d2
requirements
Browse files
app.py
CHANGED
@@ -219,7 +219,10 @@ def compute_video_embedding(video_reader, min_len):
|
|
219 |
video_frames = torch.cat(video_frames, dim=0)
|
220 |
video_frames = rearrange(video_frames, "f h w c -> f c h w")
|
221 |
torch.cuda.empty_cache()
|
222 |
-
|
|
|
|
|
|
|
223 |
|
224 |
|
225 |
@spaces.GPU(duration=120)
|
|
|
219 |
video_frames = torch.cat(video_frames, dim=0)
|
220 |
video_frames = rearrange(video_frames, "f h w c -> f c h w")
|
221 |
torch.cuda.empty_cache()
|
222 |
+
# Assuming video_embedding is a PyTorch tensor
|
223 |
+
video_embedding_safe = encoded.detach().cpu().numpy().tolist()
|
224 |
+
video_frames_safe = video_frames.detach().cpu().numpy().tolist()
|
225 |
+
return video_embedding_safe, video_frames_safe
|
226 |
|
227 |
|
228 |
@spaces.GPU(duration=120)
|