bwang0911 commited on
Commit
d42d28c
1 Parent(s): 136fb28

refactor: add imports

Browse files
Files changed (1) hide show
  1. modeling_clip.py +3 -2
modeling_clip.py CHANGED
@@ -5,8 +5,9 @@
5
  # and adjusted for Jina CLIP
6
 
7
  from functools import partial
8
- from typing import Optional, Tuple, Union
9
 
 
10
  import torch
11
  import torch.nn.functional as f
12
  import torch.utils.checkpoint
@@ -258,7 +259,7 @@ class JinaCLIPModel(JinaCLIPPreTrainedModel):
258
  device: Optional[torch.device] = None,
259
  normalize_embeddings: bool = False,
260
  **tokenizer_kwargs,
261
- ) -> Union[Tuple[Optional[torch.FloatTensor], ...], CLIPTextModelOutput]:
262
 
263
  self.eval()
264
 
 
5
  # and adjusted for Jina CLIP
6
 
7
  from functools import partial
8
+ from typing import Optional, Tuple, Union, List
9
 
10
+ import numpy as np
11
  import torch
12
  import torch.nn.functional as f
13
  import torch.utils.checkpoint
 
259
  device: Optional[torch.device] = None,
260
  normalize_embeddings: bool = False,
261
  **tokenizer_kwargs,
262
+ ) -> Union[List[torch.Tensor], np.ndarray, torch.Tensor]::
263
 
264
  self.eval()
265