jfforero commited on
Commit
06f803d
·
verified ·
1 Parent(s): 4d9922f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +38 -11
app.py CHANGED
@@ -681,6 +681,7 @@ theme = gr.themes.Soft(primary_hue="red", secondary_hue="orange", font=gr.themes
681
  block_border_color="*neutral_800"
682
  )
683
 
 
684
  with gr.Blocks(title="BELLO", fill_width=True, theme=theme) as interface:
685
  gr.HTML('<div class="main-title">Bello</div>')
686
  gr.HTML('<div class="sub-title">Lo que acaba por no terminar</div>')
@@ -701,7 +702,26 @@ with gr.Blocks(title="BELLO", fill_width=True, theme=theme) as interface:
701
  with gr.Column(scale=1):
702
  loading_indicator = gr.Group(visible=False)
703
  with loading_indicator:
704
- gr.HTML('<div class="loader"></div><p style="text-align:center; font-weight:bold; color:#ff7f50;">La IA está dibujando tu panorama y componiendo tu música...</p>')
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
705
  with gr.TabItem("Resultado de la Experiencia", visible=False) as tab:
706
  with gr.Group():
707
  with gr.Row():
@@ -710,14 +730,14 @@ with gr.Blocks(title="BELLO", fill_width=True, theme=theme) as interface:
710
  sent = gr.Label(label="💭 Análisis sentimental", elem_id="sentiment-label")
711
  trans = gr.Textbox(label="📝 Transcripción del relato", lines=2)
712
  with gr.Row():
713
- # Image preview with only icon overlay
714
  img_out = gr.Image(label="🖼️ Vista Previa Panorama 360°", height=320)
715
- # File download button removed, keep icon overlay
716
  img_file = gr.File(label="", visible=False)
717
  with gr.Row():
718
- # Music preview with only icon overlay
719
  audio_out = gr.Audio(label="🎶 Música Generada por IA")
720
- # File download button removed, keep icon overlay
721
  audio_file = gr.File(label="", visible=False)
722
 
723
  group_components.append(tab)
@@ -726,16 +746,23 @@ with gr.Blocks(title="BELLO", fill_width=True, theme=theme) as interface:
726
  with gr.Group(elem_classes="download-section"):
727
  gr.HTML('<div class="step-header">Paso 3: Descargar el HTML y visualizalo en tu navegador</div>')
728
  html_download = gr.File(label="📥 Descargar Visor Inmersivo HTML 360°", type="filepath", interactive=False)
729
- # The publish button and status remain, but the GitHub part is commented out
 
730
  publish_btn = gr.Button("📤 Publicar Escena en GitHub (Gist)", variant="primary")
731
  publish_status = gr.Markdown("")
 
732
 
733
  # Mapeos de eventos
734
- process_btn.click(
735
- fn=process_and_display,
736
- inputs=[audio_input],
737
- outputs=[loading_indicator, tab, emo, trans, sent, img_out, img_file, audio_out, audio_file, html_download, publish_status]
738
- )
 
 
 
 
 
739
 
740
  clear_btn.click(
741
  fn=clear_all,
 
681
  block_border_color="*neutral_800"
682
  )
683
 
684
+
685
  with gr.Blocks(title="BELLO", fill_width=True, theme=theme) as interface:
686
  gr.HTML('<div class="main-title">Bello</div>')
687
  gr.HTML('<div class="sub-title">Lo que acaba por no terminar</div>')
 
702
  with gr.Column(scale=1):
703
  loading_indicator = gr.Group(visible=False)
704
  with loading_indicator:
705
+ # Reemplazar el texto de carga por el estilo máquina de escribir
706
+ gr.HTML('''
707
+ <pre style="font-family: monospace; font-size: 16px; color:#ff7f50;">
708
+ A ver, adivine:
709
+
710
+ ¿Lengua o labio?
711
+ ¿ Bello o terrible?
712
+
713
+
714
+ A ver, digame:
715
+ ¿La boca dice
716
+ O el aire empuja?
717
+
718
+ ¿Tiene algo que decir,
719
+ O solo tiene ganas de decirlo?
720
+
721
+
722
+ A ver:
723
+ ¿Es usted ciego?
724
+ </pre>''')
725
  with gr.TabItem("Resultado de la Experiencia", visible=False) as tab:
726
  with gr.Group():
727
  with gr.Row():
 
730
  sent = gr.Label(label="💭 Análisis sentimental", elem_id="sentiment-label")
731
  trans = gr.Textbox(label="📝 Transcripción del relato", lines=2)
732
  with gr.Row():
733
+ # Image preview con solo ícono
734
  img_out = gr.Image(label="🖼️ Vista Previa Panorama 360°", height=320)
735
+ # Sin botón de descarga, solo ícono
736
  img_file = gr.File(label="", visible=False)
737
  with gr.Row():
738
+ # Música preview
739
  audio_out = gr.Audio(label="🎶 Música Generada por IA")
740
+ # Sin botón de descarga, solo ícono
741
  audio_file = gr.File(label="", visible=False)
742
 
743
  group_components.append(tab)
 
746
  with gr.Group(elem_classes="download-section"):
747
  gr.HTML('<div class="step-header">Paso 3: Descargar el HTML y visualizalo en tu navegador</div>')
748
  html_download = gr.File(label="📥 Descargar Visor Inmersivo HTML 360°", type="filepath", interactive=False)
749
+ # El botón de publicar en GitHub se elimina o comenta
750
+ """
751
  publish_btn = gr.Button("📤 Publicar Escena en GitHub (Gist)", variant="primary")
752
  publish_status = gr.Markdown("")
753
+ """
754
 
755
  # Mapeos de eventos
756
+ """
757
+ # Comentamos la función y el botón
758
+ def publish_to_github(html_file_path):
759
+ # código...
760
+ pass
761
+
762
+ publish_btn.click(fn=publish_to_github, inputs=[html_download], outputs=[publish_status])
763
+ """
764
+
765
+
766
 
767
  clear_btn.click(
768
  fn=clear_all,