File size: 473 Bytes
88e3f4a | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | import pytest
from omniff.models.video_captioner import VideoCaptionerModel
def test_video_captioner_interface():
model = VideoCaptionerModel(model_id="Qwen/Qwen2.5-VL-3B-Instruct", device="cpu")
assert not model.is_loaded
def test_video_captioner_infer_not_loaded():
model = VideoCaptionerModel(model_id="Qwen/Qwen2.5-VL-3B-Instruct", device="cpu")
with pytest.raises(RuntimeError, match="not loaded"):
model.infer({"video_path": "test.mp4"})
|