The data structure for multimodal data
|
```python from docarray import dataclass, Document from docarray.typing import Image, Text, JSON @dataclass class WPArticle: banner: Image headline: Text meta: JSON a = WPArticle( banner='https://.../cat-dog-flight.png', headline='Everything to know about flying with pets, ...', meta={ 'author': 'Nathan Diller', 'Column': 'By the Way - A Post Travel Destination', }, ) d = Document(a) ``` |
| left/00018.jpg | right/00018.jpg | left/00131.jpg | right/00131.jpg |
|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
| Pull from Cloud | Download, unzip, load from local |
|---|---|
| ```python right_da = ( DocumentArray.pull('jina-ai/demo-rightda', show_progress=True) .apply(preproc) .embed(model, device='cuda')[:1000] ) ``` | ```python right_da = ( DocumentArray.from_files('right/*.jpg')[:1000] .apply(preproc) .embed(model, device='cuda') ) ``` |