yaolily nielsr HF Staff commited on
Commit
b7150d9
·
verified ·
1 Parent(s): d13cb1f

Add pipeline tag and library name (#3)

Browse files

- Add pipeline tag and library name (0d8656a623cd99ffb665bfa2e3e69c930a36fe47)


Co-authored-by: Niels Rogge <[email protected]>

Files changed (1) hide show
  1. README.md +7 -3
README.md CHANGED
@@ -1,7 +1,9 @@
1
  ---
2
  datasets:
3
  - yaolily/GenS-Video-150K
4
- license: other # Research use only
 
 
5
  ---
6
 
7
  <p align="center">
@@ -149,7 +151,8 @@ def gens_frame_sampler(question: str, frame_paths: List[str], model, tokenizer,
149
 
150
  # Format the input as expected by the model
151
  frm_placeholders = ["<image1>" for _ in range(len(frames))]
152
- content = "{}Question: {}\n{}".format("".join(frm_placeholders), question, prompt)
 
153
  question_data = [{"role": "user", "content": content}]
154
 
155
  # Apply chat template
@@ -175,7 +178,8 @@ def gens_frame_sampler(question: str, frame_paths: List[str], model, tokenizer,
175
 
176
  # Decode and extract the relevant part of the response
177
  response = tokenizer.batch_decode(outputs, skip_special_tokens=True)[0]
178
- result = response.split("assistant\n")[-1].split("<|im_end|>")[0].strip()
 
179
 
180
  return result
181
 
 
1
  ---
2
  datasets:
3
  - yaolily/GenS-Video-150K
4
+ license: other
5
+ pipeline_tag: video-text-to-text
6
+ library_name: transformers
7
  ---
8
 
9
  <p align="center">
 
151
 
152
  # Format the input as expected by the model
153
  frm_placeholders = ["<image1>" for _ in range(len(frames))]
154
+ content = "{}Question: {}
155
+ {}".format("".join(frm_placeholders), question, prompt)
156
  question_data = [{"role": "user", "content": content}]
157
 
158
  # Apply chat template
 
178
 
179
  # Decode and extract the relevant part of the response
180
  response = tokenizer.batch_decode(outputs, skip_special_tokens=True)[0]
181
+ result = response.split("assistant
182
+ ")[-1].split("<|im_end|>")[0].strip()
183
 
184
  return result
185