Update multilingual-TEDX-fr.py
Browse files- multilingual-TEDX-fr.py +2 -2
multilingual-TEDX-fr.py
CHANGED
@@ -167,7 +167,7 @@ class TEDX(datasets.GeneratorBasedBuilder):
|
|
167 |
utterances = iter(utterances)
|
168 |
if self.config.single_samples:
|
169 |
yield from utterances
|
170 |
-
|
171 |
merged_utterance = next(utterances)
|
172 |
start_time = merged_utterance.start_timestamp
|
173 |
while True:
|
@@ -175,7 +175,7 @@ class TEDX(datasets.GeneratorBasedBuilder):
|
|
175 |
new_utterance = next(utterances)
|
176 |
except StopIteration:
|
177 |
yield merged_utterance
|
178 |
-
|
179 |
end_time = new_utterance.end_timestamp
|
180 |
if end_time - start_time > self.config.max_duration:
|
181 |
yield merged_utterance
|
|
|
167 |
utterances = iter(utterances)
|
168 |
if self.config.single_samples:
|
169 |
yield from utterances
|
170 |
+
return
|
171 |
merged_utterance = next(utterances)
|
172 |
start_time = merged_utterance.start_timestamp
|
173 |
while True:
|
|
|
175 |
new_utterance = next(utterances)
|
176 |
except StopIteration:
|
177 |
yield merged_utterance
|
178 |
+
return
|
179 |
end_time = new_utterance.end_timestamp
|
180 |
if end_time - start_time > self.config.max_duration:
|
181 |
yield merged_utterance
|