Update README.md
Browse files
README.md
CHANGED
|
@@ -83,6 +83,8 @@ model = AutoModelForCausalLM.from_pretrained(
|
|
| 83 |
attn_implementation="flash_attention_2",
|
| 84 |
)
|
| 85 |
processor = AutoProcessor.from_pretrained(model_name, trust_remote_code=True)
|
|
|
|
|
|
|
| 86 |
|
| 87 |
# Video conversation
|
| 88 |
conversation = [
|
|
@@ -90,8 +92,8 @@ conversation = [
|
|
| 90 |
{
|
| 91 |
"role": "user",
|
| 92 |
"content": [
|
| 93 |
-
{"type": "video", "data": {"video_path":
|
| 94 |
-
{"type": "text", "data":
|
| 95 |
]
|
| 96 |
},
|
| 97 |
]
|
|
|
|
| 83 |
attn_implementation="flash_attention_2",
|
| 84 |
)
|
| 85 |
processor = AutoProcessor.from_pretrained(model_name, trust_remote_code=True)
|
| 86 |
+
video_path = "put your video path here"
|
| 87 |
+
question = "Describe this video in detail."
|
| 88 |
|
| 89 |
# Video conversation
|
| 90 |
conversation = [
|
|
|
|
| 92 |
{
|
| 93 |
"role": "user",
|
| 94 |
"content": [
|
| 95 |
+
{"type": "video", "data": {"video_path": video_path, "fps": 1, "max_frames": 128}},
|
| 96 |
+
{"type": "text", "data": question},
|
| 97 |
]
|
| 98 |
},
|
| 99 |
]
|