Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -56,7 +56,7 @@ def uniform_sample(seq, n):
|
|
56 |
step = max(len(seq) // n, 1)
|
57 |
return seq[::step][:n]
|
58 |
|
59 |
-
def
|
60 |
vr = VideoReader(path, ctx = cpu(0))
|
61 |
idx = uniform_sample(range(len(vr)), MAX_FRAMES)
|
62 |
batch = vr.get_batch(idx).asnumpy()
|
|
|
56 |
step = max(len(seq) // n, 1)
|
57 |
return seq[::step][:n]
|
58 |
|
59 |
+
def build_video(path):
|
60 |
vr = VideoReader(path, ctx = cpu(0))
|
61 |
idx = uniform_sample(range(len(vr)), MAX_FRAMES)
|
62 |
batch = vr.get_batch(idx).asnumpy()
|