Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -32,9 +32,11 @@ def infer(video_in):
|
|
32 |
# path_to_video
|
33 |
|
34 |
print(f"VIDEO IN PATH: {video_in}")
|
|
|
|
|
35 |
|
36 |
# Execute the inference command
|
37 |
-
command = ['python', 'inference_from_video.py', '--original_args', 'ckpt/vta-ldm-clip4clip-v-large/summary.jsonl', '--model', 'ckpt/vta-ldm-clip4clip-v-large/pytorch_model_2.bin', '--data_path',
|
38 |
process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True, bufsize=1)
|
39 |
|
40 |
# Create threads to handle stdout and stderr
|
|
|
32 |
# path_to_video
|
33 |
|
34 |
print(f"VIDEO IN PATH: {video_in}")
|
35 |
+
# Get the directory name
|
36 |
+
folder_path = os.path.dirname(video_in)
|
37 |
|
38 |
# Execute the inference command
|
39 |
+
command = ['python', 'inference_from_video.py', '--original_args', 'ckpt/vta-ldm-clip4clip-v-large/summary.jsonl', '--model', 'ckpt/vta-ldm-clip4clip-v-large/pytorch_model_2.bin', '--data_path', folder_path]
|
40 |
process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True, bufsize=1)
|
41 |
|
42 |
# Create threads to handle stdout and stderr
|