Spaces:
Running
on
A100
Running
on
A100
fix navigate next/previous bug
Browse files
acestep/gradio_ui/events/results_handlers.py
CHANGED
|
@@ -1132,8 +1132,9 @@ def navigate_to_previous_batch(current_batch_index, batch_queue):
|
|
| 1132 |
|
| 1133 |
# Prepare audio outputs (up to 8)
|
| 1134 |
audio_outputs = [None] * 8
|
| 1135 |
-
for
|
| 1136 |
-
|
|
|
|
| 1137 |
|
| 1138 |
# Update batch indicator
|
| 1139 |
total_batches = len(batch_queue)
|
|
@@ -1178,8 +1179,9 @@ def navigate_to_next_batch(autogen_enabled, current_batch_index, total_batches,
|
|
| 1178 |
|
| 1179 |
# Prepare audio outputs (up to 8)
|
| 1180 |
audio_outputs = [None] * 8
|
| 1181 |
-
for
|
| 1182 |
-
|
|
|
|
| 1183 |
|
| 1184 |
# Update batch indicator
|
| 1185 |
batch_indicator_text = update_batch_indicator(new_batch_index, total_batches)
|
|
|
|
| 1132 |
|
| 1133 |
# Prepare audio outputs (up to 8)
|
| 1134 |
audio_outputs = [None] * 8
|
| 1135 |
+
real_audio_paths = [p for p in audio_paths if not p.lower().endswith('.json')]
|
| 1136 |
+
for idx in range(min(len(real_audio_paths), 8)):
|
| 1137 |
+
audio_outputs[idx] = real_audio_paths[idx]
|
| 1138 |
|
| 1139 |
# Update batch indicator
|
| 1140 |
total_batches = len(batch_queue)
|
|
|
|
| 1179 |
|
| 1180 |
# Prepare audio outputs (up to 8)
|
| 1181 |
audio_outputs = [None] * 8
|
| 1182 |
+
real_audio_paths = [p for p in audio_paths if not p.lower().endswith('.json')]
|
| 1183 |
+
for idx in range(min(len(real_audio_paths), 8)):
|
| 1184 |
+
audio_outputs[idx] = real_audio_paths[idx]
|
| 1185 |
|
| 1186 |
# Update batch indicator
|
| 1187 |
batch_indicator_text = update_batch_indicator(new_batch_index, total_batches)
|