Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -7,7 +7,7 @@ import sys
|
|
7 |
import FFV1MT_MS
|
8 |
import flow_tools
|
9 |
import transformers
|
10 |
-
|
11 |
def process_images(videos, x, y):
|
12 |
# read video file
|
13 |
cap = cv2.VideoCapture(videos)
|
@@ -87,7 +87,7 @@ if __name__ =='__main__':
|
|
87 |
# # Tesla T4
|
88 |
|
89 |
model = FFV1MT_MS.FFV1DNN()
|
90 |
-
device =
|
91 |
|
92 |
print('Number fo parameters: {}'.format(model.num_parameters()))
|
93 |
model.to(device)
|
|
|
7 |
import FFV1MT_MS
|
8 |
import flow_tools
|
9 |
import transformers
|
10 |
+
@spaces.GPU
|
11 |
def process_images(videos, x, y):
|
12 |
# read video file
|
13 |
cap = cv2.VideoCapture(videos)
|
|
|
87 |
# # Tesla T4
|
88 |
|
89 |
model = FFV1MT_MS.FFV1DNN()
|
90 |
+
device = "GPU 🔥" if torch.cuda.is_available() else "CPU 🥶"
|
91 |
|
92 |
print('Number fo parameters: {}'.format(model.num_parameters()))
|
93 |
model.to(device)
|