czczup commited on
Commit
bb4dc37
1 Parent(s): e551460

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +2 -3
README.md CHANGED
@@ -263,9 +263,8 @@ video_path = './examples/red-panda.mp4'
263
  # pixel_values, num_patches_list = load_video(video_path, num_segments=32, max_num=1)
264
  pixel_values, num_patches_list = load_video(video_path, num_segments=8, max_num=2)
265
  pixel_values = pixel_values.to(torch.bfloat16).cuda()
266
- video_prefix = '\n'.join([f'Frame{i+1}:<image>' for i in range(len(num_patches_list))])
267
- question = video_prefix + 'What is the red panda doing?'
268
- # Frame1:<image>\nFrame2:<image>\n...\nFrame31:<image>\n{question}
269
  response, history = model.chat(tokenizer, pixel_values, question, generation_config,
270
  num_patches_list=num_patches_list,
271
  history=None, return_history=True)
 
263
  # pixel_values, num_patches_list = load_video(video_path, num_segments=32, max_num=1)
264
  pixel_values, num_patches_list = load_video(video_path, num_segments=8, max_num=2)
265
  pixel_values = pixel_values.to(torch.bfloat16).cuda()
266
+ video_prefix = '\n'.join([f'Frame{i+1}: <image>' for i in range(len(num_patches_list))]) + '\n'question = video_prefix + 'What is the red panda doing?'
267
+ # Frame1: <image>\nFrame2: <image>\n...\nFrame31: <image>\n{question}
 
268
  response, history = model.chat(tokenizer, pixel_values, question, generation_config,
269
  num_patches_list=num_patches_list,
270
  history=None, return_history=True)