ZhangYuanhan commited on
Commit
5c8cb9d
1 Parent(s): 0ecefc2

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +2 -1
README.md CHANGED
@@ -193,6 +193,7 @@ video_path = "XXXX"
193
  max_frames_num = "110"
194
  video,frame_time,video_time = load_video(video_path, max_frames_num, 1, force_sample=True)
195
  video = image_processor.preprocess(video, return_tensors="pt")["pixel_values"].cuda().bfloat16()
 
196
  conv_template = "qwen_1_5" # Make sure you use correct chat template for different models
197
  question = DEFAULT_IMAGE_TOKEN + "\nPlease describe this video in detail."
198
  conv = copy.deepcopy(conv_templates[conv_template])
@@ -203,7 +204,7 @@ input_ids = tokenizer_image_token(prompt_question, tokenizer, IMAGE_TOKEN_INDEX,
203
  cont = model.generate(
204
  input_ids,
205
  images=video,
206
- modalities="video"
207
  do_sample=False,
208
  temperature=0,
209
  max_new_tokens=4096,
 
193
  max_frames_num = "110"
194
  video,frame_time,video_time = load_video(video_path, max_frames_num, 1, force_sample=True)
195
  video = image_processor.preprocess(video, return_tensors="pt")["pixel_values"].cuda().bfloat16()
196
+ video = [video]
197
  conv_template = "qwen_1_5" # Make sure you use correct chat template for different models
198
  question = DEFAULT_IMAGE_TOKEN + "\nPlease describe this video in detail."
199
  conv = copy.deepcopy(conv_templates[conv_template])
 
204
  cont = model.generate(
205
  input_ids,
206
  images=video,
207
+ modalities=["video"],
208
  do_sample=False,
209
  temperature=0,
210
  max_new_tokens=4096,