gina9726 commited on
Commit
56a1b99
·
verified ·
1 Parent(s): 3a9a338

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -22,7 +22,8 @@ def load_v2t_samples(data_root):
22
 
23
  def load_t2v_samples(data_root):
24
  sample_text = ['cut the sausage', 'stir vegetables into salmon', 'rinse cutting board']
25
- idx2sid = {0: 2119, 1: 1730, 2: 1276}
 
26
  return sample_text, idx2sid
27
 
28
  def format_pred(pred, gt):
@@ -45,6 +46,8 @@ def main():
45
  print(v2t_samples)
46
 
47
  def predict_v2t(idx):
 
 
48
  sid = idx2sid_v2t[idx]
49
  zeroshot_action, gt_action = lavila.predict_v2t(idx, sid)
50
  egovpa_action, gt_action = egovpa.predict_v2t(idx, sid)
 
22
 
23
  def load_t2v_samples(data_root):
24
  sample_text = ['cut the sausage', 'stir vegetables into salmon', 'rinse cutting board']
25
+ #idx2sid = {0: 2119, 1: 1730, 2: 1276}
26
+ idx2sid = {0: 2119, 2: 1276}
27
  return sample_text, idx2sid
28
 
29
  def format_pred(pred, gt):
 
46
  print(v2t_samples)
47
 
48
  def predict_v2t(idx):
49
+ if idx == 1:
50
+ idx = 2
51
  sid = idx2sid_v2t[idx]
52
  zeroshot_action, gt_action = lavila.predict_v2t(idx, sid)
53
  egovpa_action, gt_action = egovpa.predict_v2t(idx, sid)