JustinLin610 commited on
Commit
fc8f869
1 Parent(s): 11c1deb

fix video bug

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -64,7 +64,7 @@ def video_text_zeroshot(video, text_list):
64
  labels = [label.strip(" ") for label in text_list.strip(" ").split("|")]
65
  inputs = {
66
  ModalityType.TEXT: data.load_and_transform_text(labels, device),
67
- ModalityType.VIDEO: data.load_and_transform_video_data(video_paths, device),
68
  }
69
 
70
  with torch.no_grad():
@@ -72,7 +72,7 @@ def video_text_zeroshot(video, text_list):
72
 
73
  scores = (
74
  torch.softmax(
75
- embeddings[ModalityType.AUDIO] @ embeddings[ModalityType.TEXT].T, dim=-1
76
  )
77
  .squeeze(0)
78
  .tolist()
 
64
  labels = [label.strip(" ") for label in text_list.strip(" ").split("|")]
65
  inputs = {
66
  ModalityType.TEXT: data.load_and_transform_text(labels, device),
67
+ ModalityType.VISION: data.load_and_transform_video_data(video_paths, device),
68
  }
69
 
70
  with torch.no_grad():
 
72
 
73
  scores = (
74
  torch.softmax(
75
+ embeddings[ModalityType.VISION] @ embeddings[ModalityType.TEXT].T, dim=-1
76
  )
77
  .squeeze(0)
78
  .tolist()