nateraw commited on
Commit
a5d0544
β€’
1 Parent(s): 6c22a09

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -109,7 +109,7 @@ class Pipeline:
109
  text = ""
110
  MAX_ITERATIONS = 5
111
  with torch.autocast(self.device):
112
- for i, (start, stop, frames) in enumerate(iter_clips(video_path)):
113
  text_to_add = f"{'-'*30} Predictions From: {start:2.3f}-{stop:2.3f} seconds {'-'*30}\n"
114
  print(text_to_add)
115
  text += text_to_add
@@ -136,7 +136,7 @@ class Pipeline:
136
  print(text_to_add)
137
  text += text_to_add
138
 
139
- if (i+1) >= MAX_ITERATIONS:
140
  return text
141
  return text
142
 
 
109
  text = ""
110
  MAX_ITERATIONS = 5
111
  with torch.autocast(self.device):
112
+ for clip_idx, (start, stop, frames) in enumerate(iter_clips(video_path)):
113
  text_to_add = f"{'-'*30} Predictions From: {start:2.3f}-{stop:2.3f} seconds {'-'*30}\n"
114
  print(text_to_add)
115
  text += text_to_add
 
136
  print(text_to_add)
137
  text += text_to_add
138
 
139
+ if (clip_idx+1) >= MAX_ITERATIONS:
140
  return text
141
  return text
142