Skip to content

Commit

Permalink
docs: remove bytes field example
Browse files Browse the repository at this point in the history
Signed-off-by: punndcoder28 <puneethk.2899@gmail.com>
  • Loading branch information
punndcoder28 committed Sep 6, 2023
1 parent b72c09c commit 0eb7502
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions docarray/documents/image.py
Expand Up @@ -96,23 +96,19 @@ class MultiModalDoc(BaseDoc):
"""

url: Optional[ImageUrl] = Field(
description='URL of the remote image',
description='''URL to a (potentially remote) image file that needs to be
loaded''',
example='https://github.com/docarray/docarray/blob/main/tests/toydata/image-data/apple.png?raw=true',
)
tensor: Optional[ImageTensor] = Field(
description='''Tensor object of the image which can be specifed to one of
`ImageNdArray`, `ImageTorchTensor`, `ImageTensorflowTensor`.''',
example='img.url.load()',
description='Tensor object of one of the image tensors',
)
embedding: Optional[AnyEmbedding] = Field(
description='''Embedding field is used to store tensor objects of type
Tensorflow, PyTorch, NumPy and Jax''',
example='np.zeros((3, 32, 32))',
description='Store an embedding: a vector representation of the image.',
example='[[0, 1, 1], [1, 0, 1], [1, 1, 0]]',
)
bytes_: Optional[ImageBytes] = Field(
description='''Bytes object of the image which is an instance of
`ImageBytes.''',
example='img.url.load_bytes()',
description='Bytes representation of the image.',
)

@classmethod
Expand Down

0 comments on commit 0eb7502

Please sign in to comment.