SajayR commited on
Commit
b0ea89d
·
verified ·
1 Parent(s): 1d56a29

Update hf_model.py

Browse files
Files changed (1) hide show
  1. hf_model.py +1 -1
hf_model.py CHANGED
@@ -182,7 +182,7 @@ class Triad(nn.Module):
182
  assert image is not None or audio is not None or text_list is not None, "At least one modality must be provided"
183
  if image is not None: assert image is not str, "Frames should be a path to an image"
184
  if audio is not None:
185
- assert isinstance(audio, torch.Tensor) and audio.shape[0] == 1 and len(audio.shape) == 2, "Audio must be a PyTorch tensor of shape (1, T)"
186
  if text_list is not None:
187
  assert isinstance(text_list, list) and len(text_list) == 1, "Text list must be a list of strings of length 1"
188
  if image is not None:
 
182
  assert image is not None or audio is not None or text_list is not None, "At least one modality must be provided"
183
  if image is not None: assert image is not str, "Frames should be a path to an image"
184
  if audio is not None:
185
+ assert isinstance(audio, torch.Tensor) and len(audio.shape) == 2, "Audio must be a PyTorch tensor of shape (B, T)"
186
  if text_list is not None:
187
  assert isinstance(text_list, list) and len(text_list) == 1, "Text list must be a list of strings of length 1"
188
  if image is not None: