Aliayub1995
commited on
Commit
•
af62b0e
1
Parent(s):
4d795e7
Update videollama2/__init__.py
Browse files- videollama2/__init__.py +2 -4
videollama2/__init__.py
CHANGED
@@ -24,7 +24,7 @@ def model_init(model_path=None, **kwargs):
|
|
24 |
tokenizer.pad_token = tokenizer.unk_token
|
25 |
|
26 |
num_frames = model.config.num_frames if hasattr(model.config, "num_frames") else NUM_FRAMES
|
27 |
-
|
28 |
processor = {
|
29 |
'image': partial(process_image, processor=processor, aspect_ratio=None),
|
30 |
'video': partial(process_video, processor=processor, aspect_ratio=None, num_frames=num_frames),
|
@@ -46,9 +46,7 @@ def mm_infer(url, instruct, model, tokenizer, modal='video', **kwargs):
|
|
46 |
Returns:
|
47 |
str: response of the model.
|
48 |
"""
|
49 |
-
|
50 |
-
gdown.download(url, output, quiet=False)
|
51 |
-
logging.info(f"video downloaded form: {url}")
|
52 |
# 1. text preprocess (tag process & generate prompt).
|
53 |
if modal == 'image':
|
54 |
modal_token = DEFAULT_IMAGE_TOKEN
|
|
|
24 |
tokenizer.pad_token = tokenizer.unk_token
|
25 |
|
26 |
num_frames = model.config.num_frames if hasattr(model.config, "num_frames") else NUM_FRAMES
|
27 |
+
|
28 |
processor = {
|
29 |
'image': partial(process_image, processor=processor, aspect_ratio=None),
|
30 |
'video': partial(process_video, processor=processor, aspect_ratio=None, num_frames=num_frames),
|
|
|
46 |
Returns:
|
47 |
str: response of the model.
|
48 |
"""
|
49 |
+
|
|
|
|
|
50 |
# 1. text preprocess (tag process & generate prompt).
|
51 |
if modal == 'image':
|
52 |
modal_token = DEFAULT_IMAGE_TOKEN
|