lorocksUMD commited on
Commit
db52c57
·
verified ·
1 Parent(s): 77007c9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -7
app.py CHANGED
@@ -62,7 +62,7 @@ for filename, url in sample_videos_urls.items():
62
  print(f"{filename} already exists. Skipping download.")
63
 
64
  csv.field_size_limit(100000000)
65
- options = ['language', "sound-language", "sound"] # Changed second to initial
66
  load_size = 224
67
  plot_size = 224
68
 
@@ -74,16 +74,12 @@ video_output2 = gr.Video(label="Multi-Head Audio Video Attention (Only Availible
74
  height=480)
75
  video_output3 = gr.Video(label="Visual Features", height=480)
76
 
77
- # models = {o: LitAVAligner.from_pretrained(f"mhamilton723/DenseAV-{o}") for o in options}
78
- models = {o: None for o in options}
79
-
80
- for o in options:
81
- print(o)
82
- models[o] = LitAVAligner.from_pretrained(f"mhamilton723/DenseAV-{o}")
83
 
84
  def process_video(video, model_option):
85
  # model = models[model_option].cuda()
86
  model = models[model_option]
 
87
 
88
  original_frames, audio, info = torchvision.io.read_video(video, end_pts=10, pts_unit='sec')
89
  sample_rate = 16000
 
62
  print(f"{filename} already exists. Skipping download.")
63
 
64
  csv.field_size_limit(100000000)
65
+ options = ['language', "sound_and_language", "sound"] # Changed second to initial
66
  load_size = 224
67
  plot_size = 224
68
 
 
74
  height=480)
75
  video_output3 = gr.Video(label="Visual Features", height=480)
76
 
77
+ models = {o: LitAVAligner.from_pretrained(f"mhamilton723/DenseAV-{o}") for o in ['language', "sound-language", "sound"]}
 
 
 
 
 
78
 
79
  def process_video(video, model_option):
80
  # model = models[model_option].cuda()
81
  model = models[model_option]
82
+ print(model_option)
83
 
84
  original_frames, audio, info = torchvision.io.read_video(video, end_pts=10, pts_unit='sec')
85
  sample_rate = 16000