Spaces:
Sleeping
Sleeping
Update stf_utils.py
Browse files- stf_utils.py +9 -9
stf_utils.py
CHANGED
@@ -134,15 +134,15 @@ class STFPipeline:
|
|
134 |
|
135 |
|
136 |
try:
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
|
147 |
except StopIteration as e:
|
148 |
pass
|
|
|
134 |
|
135 |
|
136 |
try:
|
137 |
+
# ์์ฐจ์ ์ผ๋ก gen_infer๋ฅผ ์คํ
|
138 |
+
gen_infer = self.template.gen_infer(audio_segment, pivot)
|
139 |
+
|
140 |
+
for idx, (it, chunk) in enumerate(gen_infer, pivot):
|
141 |
+
frame = next(reader) # ๋ค์ ํ๋ ์์ ์ฝ์
|
142 |
+
composed = self.template.compose(idx, frame, it) # ํฉ์ฑ ์์
์ํ
|
143 |
+
frame_name = f"{idx}".zfill(5) + ".jpg"
|
144 |
+
results.append(it['pred']) # ๊ฒฐ๊ณผ๋ฅผ ์ ์ฅ
|
145 |
+
pivot = idx + 1
|
146 |
|
147 |
except StopIteration as e:
|
148 |
pass
|