Suprath commited on
Commit
55c3ec1
·
verified ·
1 Parent(s): acee45e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -118,7 +118,7 @@ def predict_and_save(process_video):
118
 
119
  # Collect timestamps and texts
120
  transcript = []
121
- for i, (start, end) in enumerate(sample['net_input']['audio_lengths'], 1):
122
  start_time = float(start) / 16_000
123
  end_time = float(end) / 16_000
124
  text = hypo[i].strip()
@@ -130,6 +130,7 @@ def predict_and_save(process_video):
130
 
131
  return hypo
132
 
 
133
  def preprocess_video(input_video_path):
134
  if torch.cuda.is_available():
135
  detector = dlib.cnn_face_detection_model_v1(face_detector_path)
 
118
 
119
  # Collect timestamps and texts
120
  transcript = []
121
+ for i, (start, end) in enumerate(sample['net_input']['video_lengths'], 1):
122
  start_time = float(start) / 16_000
123
  end_time = float(end) / 16_000
124
  text = hypo[i].strip()
 
130
 
131
  return hypo
132
 
133
+
134
  def preprocess_video(input_video_path):
135
  if torch.cuda.is_available():
136
  detector = dlib.cnn_face_detection_model_v1(face_detector_path)