ChuxiJ commited on
Commit
7642e62
·
1 Parent(s): 388b5af

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 idx in range(min(len(audio_paths), 8)):
1136
- audio_outputs[idx] = audio_paths[idx]
 
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 idx in range(min(len(audio_paths), 8)):
1182
- audio_outputs[idx] = audio_paths[idx]
 
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)