Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -109,7 +109,7 @@ class Pipeline:
|
|
109 |
text = ""
|
110 |
MAX_ITERATIONS = 5
|
111 |
with torch.autocast(self.device):
|
112 |
-
for
|
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 (
|
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 |
|