juangtzi commited on
Commit
40aa950
1 Parent(s): 5e47240

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -2
app.py CHANGED
@@ -80,8 +80,6 @@ def speech_to_speech_translation(audio):
80
  title = "Cascaded STST"
81
  description = """
82
  Demo for cascaded speech-to-speech translation (STST), mapping from source speech in any language to target speech in Spanish.
83
-
84
- ![Cascaded STST](https://huggingface.co/datasets/huggingface-course/audio-course-images/resolve/main/s2st_cascaded.png "Diagram of cascaded speech to speech translation")
85
  """
86
 
87
  demo = gr.Blocks()
@@ -103,7 +101,21 @@ file_translate = gr.Interface(
103
  description=description,
104
  )
105
 
 
 
106
  with demo:
 
 
 
 
 
 
 
 
107
  gr.TabbedInterface([mic_translate, file_translate], ["Microphone", "Audio File"])
108
 
 
 
 
 
109
  demo.launch()
 
80
  title = "Cascaded STST"
81
  description = """
82
  Demo for cascaded speech-to-speech translation (STST), mapping from source speech in any language to target speech in Spanish.
 
 
83
  """
84
 
85
  demo = gr.Blocks()
 
101
  description=description,
102
  )
103
 
104
+
105
+ # Definir la estructura dentro de gr.Blocks()
106
  with demo:
107
+ # Mostrar el título y la descripción
108
+ gr.Markdown(f"# {title}")
109
+ gr.Markdown(description)
110
+
111
+ # Incluir la imagen
112
+ gr.Image("https://huggingface.co/datasets/huggingface-course/audio-course-images/resolve/main/s2st_cascaded.png")
113
+
114
+ # Tabbed Interface para las dos modalidades
115
  gr.TabbedInterface([mic_translate, file_translate], ["Microphone", "Audio File"])
116
 
117
+
118
+ # with demo:
119
+ # gr.TabbedInterface([mic_translate, file_translate], ["Microphone", "Audio File"])
120
+
121
  demo.launch()