Spaces:
Sleeping
Sleeping
Update run.py
Browse files
run.py
CHANGED
@@ -32,10 +32,12 @@ def fast_caption(sys_prompt, usr_prompt, temp, top_p, max_tokens, model, key, en
|
|
32 |
print("begin video_hf")
|
33 |
# Handle Hugging Face dataset
|
34 |
video_paths = load_hf_dataset(video_hf, video_hf_auth)
|
|
|
35 |
# Process all videos in the dataset
|
36 |
all_captions = []
|
37 |
for video_path in video_paths:
|
38 |
print("video_path")
|
|
|
39 |
if video_path.endswith('.mp4'): # 假设我们只处理.mp4文件
|
40 |
processor = VideoProcessor(frame_format=frame_format, frame_limit=frame_limit)
|
41 |
frames = processor._decode(video_path)
|
|
|
32 |
print("begin video_hf")
|
33 |
# Handle Hugging Face dataset
|
34 |
video_paths = load_hf_dataset(video_hf, video_hf_auth)
|
35 |
+
video_paths = video_paths["train"]
|
36 |
# Process all videos in the dataset
|
37 |
all_captions = []
|
38 |
for video_path in video_paths:
|
39 |
print("video_path")
|
40 |
+
video_path = video_path["id"]
|
41 |
if video_path.endswith('.mp4'): # 假设我们只处理.mp4文件
|
42 |
processor = VideoProcessor(frame_format=frame_format, frame_limit=frame_limit)
|
43 |
frames = processor._decode(video_path)
|