Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -61,13 +61,13 @@ output_video_path = "/home/user/app/video/và/test"
|
|
61 |
modalities = ["video"]
|
62 |
gen_subset = "test"
|
63 |
gen_cfg = GenerationConfig(beam=20)
|
64 |
-
models, saved_cfg, task = checkpoint_utils.load_model_ensemble_and_task([ckpt_path])
|
65 |
-
models = [model.eval().cuda() if torch.cuda.is_available() else model.eval() for model in models]
|
66 |
-
saved_cfg.task.modalities = modalities
|
67 |
-
saved_cfg.task.data = data_dir
|
68 |
-
saved_cfg.task.label_dir = data_dir
|
69 |
-
task = tasks.setup_task(saved_cfg.task)
|
70 |
-
generator = task.build_generator(models, gen_cfg)
|
71 |
|
72 |
def get_youtube(video_url):
|
73 |
yt = YouTube(video_url)
|
|
|
61 |
modalities = ["video"]
|
62 |
gen_subset = "test"
|
63 |
gen_cfg = GenerationConfig(beam=20)
|
64 |
+
# models, saved_cfg, task = checkpoint_utils.load_model_ensemble_and_task([ckpt_path])
|
65 |
+
# models = [model.eval().cuda() if torch.cuda.is_available() else model.eval() for model in models]
|
66 |
+
# saved_cfg.task.modalities = modalities
|
67 |
+
# saved_cfg.task.data = data_dir
|
68 |
+
# saved_cfg.task.label_dir = data_dir
|
69 |
+
# task = tasks.setup_task(saved_cfg.task)
|
70 |
+
# generator = task.build_generator(models, gen_cfg)
|
71 |
|
72 |
def get_youtube(video_url):
|
73 |
yt = YouTube(video_url)
|