Jiqing commited on
Commit
311229b
1 Parent(s): d503134

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +5 -2
README.md CHANGED
@@ -97,10 +97,13 @@ def decode(container, sampling_rate, num_frames, clip_idx, num_clips, target_fps
97
 
98
 
99
  file = hf_hub_download(repo_id="Intel/tvp_demo", filename="3MSZA.mp4", repo_type="dataset")
 
 
 
100
  decoder_kwargs = dict(
101
  container=av.open(file, metadata_errors="ignore"),
102
  sampling_rate=1,
103
- num_frames=48,
104
  clip_idx=0,
105
  num_clips=1,
106
  target_fps=3,
@@ -112,7 +115,7 @@ processor = AutoProcessor.from_pretrained("Intel/tvp-base")
112
  data = processor(
113
  text=["person turn a light on."], videos=list(raw_sampled_frms.numpy()), return_tensors="pt", max_text_length=100
114
  )
115
- model = AutoModel.from_pretrained("Intel/tvp-base")
116
  output = model(**data)
117
 
118
  print(output)
 
97
 
98
 
99
  file = hf_hub_download(repo_id="Intel/tvp_demo", filename="3MSZA.mp4", repo_type="dataset")
100
+
101
+ model = AutoModel.from_pretrained("Intel/tvp-base")
102
+
103
  decoder_kwargs = dict(
104
  container=av.open(file, metadata_errors="ignore"),
105
  sampling_rate=1,
106
+ num_frames=model.config.num_frm,
107
  clip_idx=0,
108
  num_clips=1,
109
  target_fps=3,
 
115
  data = processor(
116
  text=["person turn a light on."], videos=list(raw_sampled_frms.numpy()), return_tensors="pt", max_text_length=100
117
  )
118
+
119
  output = model(**data)
120
 
121
  print(output)