ZhangYuanhan
commited on
Commit
•
5a09702
1
Parent(s):
cc09103
Update README.md
Browse files
README.md
CHANGED
@@ -198,7 +198,8 @@ video,frame_time,video_time = load_video(video_path, max_frames_num, 1, force_sa
|
|
198 |
video = image_processor.preprocess(video, return_tensors="pt")["pixel_values"].cuda().bfloat16()
|
199 |
video = [video]
|
200 |
conv_template = "qwen_1_5" # Make sure you use correct chat template for different models
|
201 |
-
|
|
|
202 |
conv = copy.deepcopy(conv_templates[conv_template])
|
203 |
conv.append_message(conv.roles[0], question)
|
204 |
conv.append_message(conv.roles[1], None)
|
|
|
198 |
video = image_processor.preprocess(video, return_tensors="pt")["pixel_values"].cuda().bfloat16()
|
199 |
video = [video]
|
200 |
conv_template = "qwen_1_5" # Make sure you use correct chat template for different models
|
201 |
+
time_instruciton = f"The video lasts for {video_time:.2f} seconds, and {len(video[0])} frames are uniformly sampled from it. These frames are located at {frame_time}.Please answer the following questions related to this video."
|
202 |
+
question = DEFAULT_IMAGE_TOKEN + f"{time_instruciton}\nPlease describe this video in detail."
|
203 |
conv = copy.deepcopy(conv_templates[conv_template])
|
204 |
conv.append_message(conv.roles[0], question)
|
205 |
conv.append_message(conv.roles[1], None)
|