MTTR commited on
Commit
a56583c
1 Parent(s): 7df51c4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -70,13 +70,13 @@ def process(text_query, full_video_path):
70
  subclip = video.subclip(start_pt, end_pt)
71
  subclip.write_videofile(input_clip_path)
72
 
73
- checkpoint_path ='./refer-youtube-vos_window-12.pth.tar'
74
- model, postprocessor = torch.hub.load('Randl/MTTR:main','mttr_refer_youtube_vos', get_weights=False)
75
 
76
- model_state_dict = torch.load(checkpoint_path, map_location='cpu')
77
- if 'model_state_dict' in model_state_dict.keys():
78
- model_state_dict = model_state_dict['model_state_dict']
79
- model.load_state_dict(model_state_dict, strict=True)
80
 
81
 
82
  text_queries= [text_query]
 
70
  subclip = video.subclip(start_pt, end_pt)
71
  subclip.write_videofile(input_clip_path)
72
 
73
+ # checkpoint_path ='./refer-youtube-vos_window-12.pth.tar'
74
+ model, postprocessor = torch.hub.load('Randl/MTTR:main','mttr_refer_youtube_vos', get_weights=True)
75
 
76
+ # model_state_dict = torch.load(checkpoint_path, map_location='cpu')
77
+ # if 'model_state_dict' in model_state_dict.keys():
78
+ # model_state_dict = model_state_dict['model_state_dict']
79
+ # model.load_state_dict(model_state_dict, strict=True)
80
 
81
 
82
  text_queries= [text_query]