Safetensors
English
qwen2_vl
qwen_vl
video
real-time
multimodal
LLM
chenjoya commited on
Commit
626ff17
·
verified ·
1 Parent(s): be19b95

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +7 -0
README.md CHANGED
@@ -40,6 +40,13 @@ pip install qwen-vl-utils livecc-utils
40
  Here we show a code snippet to show you how to do **real-time video commentary** with `transformers` and the above utils:
41
 
42
  ```python
 
 
 
 
 
 
 
43
  class LiveCCDemoInfer:
44
  fps = 2
45
  initial_fps_frames = 6
 
40
  Here we show a code snippet to show you how to do **real-time video commentary** with `transformers` and the above utils:
41
 
42
  ```python
43
+ import functools, torch, os, tqdm
44
+ from liger_kernel.transformers import apply_liger_kernel_to_qwen2_vl
45
+ apply_liger_kernel_to_qwen2_vl() # important. our model is trained with this. keep consistency
46
+ from transformers import Qwen2VLForConditionalGeneration, AutoProcessor, LogitsProcessor, logging
47
+ from livecc_utils import prepare_multiturn_multimodal_inputs_for_generation, get_smart_resized_clip, get_smart_resized_video_reader
48
+ from qwen_vl_utils import process_vision_info
49
+
50
  class LiveCCDemoInfer:
51
  fps = 2
52
  initial_fps_frames = 6