update readme example
Browse files
README.md
CHANGED
|
@@ -16,16 +16,16 @@ pipeline_tag: visual-question-answering
|
|
| 16 |
import torch
|
| 17 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 18 |
|
| 19 |
-
tokenizer = AutoTokenizer.from_pretrained("/
|
| 20 |
model = AutoModelForCausalLM.from_pretrained(
|
| 21 |
-
"/
|
| 22 |
torch_dtype=torch.bfloat16,
|
| 23 |
trust_remote_code=True,
|
| 24 |
)
|
| 25 |
model = model.to("cuda")
|
| 26 |
terminators = [tokenizer.eos_token_id, tokenizer.convert_tokens_to_ids("<|eot_id|>")]
|
| 27 |
|
| 28 |
-
video_path = "path/to/video"
|
| 29 |
query = "Please describe this video"
|
| 30 |
out, history = model.chat(video_path=video_path,
|
| 31 |
query=query,
|
|
|
|
| 16 |
import torch
|
| 17 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 18 |
|
| 19 |
+
tokenizer = AutoTokenizer.from_pretrained("KangarooGroup/kangaroo")
|
| 20 |
model = AutoModelForCausalLM.from_pretrained(
|
| 21 |
+
"KangarooGroup/kangaroo",
|
| 22 |
torch_dtype=torch.bfloat16,
|
| 23 |
trust_remote_code=True,
|
| 24 |
)
|
| 25 |
model = model.to("cuda")
|
| 26 |
terminators = [tokenizer.eos_token_id, tokenizer.convert_tokens_to_ids("<|eot_id|>")]
|
| 27 |
|
| 28 |
+
video_path = "/path/to/video"
|
| 29 |
query = "Please describe this video"
|
| 30 |
out, history = model.chat(video_path=video_path,
|
| 31 |
query=query,
|