Buckets:
AnonymousSpottedToad/human_verified_bucket / codebase /python /autonomi-ai_nos /tests /models /test_blip.py
| """BLIP model tests and benchmarks.""" | |
| import pytest | |
| from nos.models import BLIP | |
| from nos.test.utils import NOS_TEST_IMAGE, skip_if_no_torch_cuda | |
| def model(): | |
| MODEL_NAME = "Salesforce/blip-image-captioning-large" | |
| yield BLIP(model_name=MODEL_NAME) | |
| def test_blip_caption(model): | |
| from PIL import Image | |
| im = Image.open(NOS_TEST_IMAGE) | |
| caption = model(im) | |
| assert caption is not None | |
| vqa_answer = model(im, prompt="What's in this picture?") | |
| assert vqa_answer is not None | |
Xet Storage Details
- Size:
- 559 Bytes
- Xet hash:
- 7731bf5d83aca24b38d4f1f250976c45d43e6ee97229d47bd37e256ed039843b
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.