jfforero commited on
Commit
87799cc
·
verified ·
1 Parent(s): 4191e25

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -612,6 +612,7 @@ def create_fade_transition(images, fade_duration=1.0, fps=24):
612
 
613
 
614
 
 
615
  # Update the process_and_display function to handle the fade animation correctly
616
  def process_and_display(audio_input, generate_audio, chunk_duration):
617
  # Validate chunk duration
@@ -626,7 +627,7 @@ def process_and_display(audio_input, generate_audio, chunk_duration):
626
  <style>@keyframes spin {{ 0% {{ transform: rotate(0deg); }} 100% {{ transform: rotate(360deg); }} }}</style>
627
  <p style="font-size: 14px; color: #4a4a4a;">This may take several minutes depending on the audio length...</p>
628
  </div>
629
- """)] + [gr.Group(visible=False)] * len(group_components) + [None] * (len(output_containers) * 6) + [None, None, None]
630
 
631
  results = get_predictions(audio_input, generate_audio, chunk_duration)
632
 
@@ -676,7 +677,10 @@ def process_and_display(audio_input, generate_audio, chunk_duration):
676
  viewer_html_path = create_360_viewer_html(all_360_images, tmp_file.name)
677
 
678
  # Hide loading indicator and show results
679
- yield [gr.HTML("")] + group_visibility + outputs + [fade_preview, fade_animation_path, viewer_html_path]
 
 
 
680
 
681
  # Update the clear_all function to handle the new outputs
682
  def clear_all():
 
612
 
613
 
614
 
615
+ # Update the process_and_display function to handle the fade animation correctly
616
  # Update the process_and_display function to handle the fade animation correctly
617
  def process_and_display(audio_input, generate_audio, chunk_duration):
618
  # Validate chunk duration
 
627
  <style>@keyframes spin {{ 0% {{ transform: rotate(0deg); }} 100% {{ transform: rotate(360deg); }} }}</style>
628
  <p style="font-size: 14px; color: #4a4a4a;">This may take several minutes depending on the audio length...</p>
629
  </div>
630
+ """)] + [gr.Group(visible=False)] * len(group_components) + [None] * (len(output_containers) * 6) + [None, None, None, ""]
631
 
632
  results = get_predictions(audio_input, generate_audio, chunk_duration)
633
 
 
677
  viewer_html_path = create_360_viewer_html(all_360_images, tmp_file.name)
678
 
679
  # Hide loading indicator and show results
680
+ yield [gr.HTML("")] + group_visibility + outputs + [fade_preview, fade_animation_path, viewer_html_path, ""]
681
+
682
+
683
+
684
 
685
  # Update the clear_all function to handle the new outputs
686
  def clear_all():