Update script.py
Browse files
script.py
CHANGED
|
@@ -16,18 +16,6 @@ import numpy as np
|
|
| 16 |
# So you must include everything you need in your model repo.
|
| 17 |
|
| 18 |
|
| 19 |
-
import torch
|
| 20 |
-
|
| 21 |
-
# from torchcodec.decoders import VideoDecoder
|
| 22 |
-
|
| 23 |
-
# def preprocess_v1(file_like):
|
| 24 |
-
# file_like.seek(0)
|
| 25 |
-
# decoder = VideoDecoder(file_like)
|
| 26 |
-
# frames = decoder[0:-1:20]
|
| 27 |
-
# frames = frames.float() / 255.0
|
| 28 |
-
# return frames
|
| 29 |
-
|
| 30 |
-
|
| 31 |
def preprocess(file_like):
|
| 32 |
# Open the video file
|
| 33 |
file_like.seek(0)
|
|
|
|
| 16 |
# So you must include everything you need in your model repo.
|
| 17 |
|
| 18 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
def preprocess(file_like):
|
| 20 |
# Open the video file
|
| 21 |
file_like.seek(0)
|