ckandemir commited on
Commit
23439c2
1 Parent(s): f01321a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -3
app.py CHANGED
@@ -75,6 +75,7 @@ Demo for cascaded speech-to-speech translation (STST), mapping from source speec
75
  [SpeechT5 TTS](https://huggingface.co/microsoft/speecht5_tts) model for text-to-speech, fine-tuned in French Audio dataset:
76
  ![Cascaded STST](https://huggingface.co/datasets/huggingface-course/audio-course-images/resolve/main/s2st_cascaded.png "Diagram of cascaded speech to speech translation")
77
  """
 
78
 
79
  mic_translate = gr.Interface(
80
  fn=speech_to_speech_translation,
@@ -93,8 +94,10 @@ file_translate = gr.Interface(
93
  description=description,
94
  )
95
 
96
- # Define and launch the tabbed interface directly
97
- tabbed_interface = gr.TabbedInterface([mic_translate, file_translate], ["Microphone", "Audio File"])
98
- tabbed_interface.launch()
 
 
99
 
100
 
 
75
  [SpeechT5 TTS](https://huggingface.co/microsoft/speecht5_tts) model for text-to-speech, fine-tuned in French Audio dataset:
76
  ![Cascaded STST](https://huggingface.co/datasets/huggingface-course/audio-course-images/resolve/main/s2st_cascaded.png "Diagram of cascaded speech to speech translation")
77
  """
78
+ demo = gr.Blocks()
79
 
80
  mic_translate = gr.Interface(
81
  fn=speech_to_speech_translation,
 
94
  description=description,
95
  )
96
 
97
+ with demo:
98
+ gr.TabbedInterface([mic_translate, file_translate], ["Microphone", "Audio File"])
99
+
100
+ demo.launch()
101
+
102
 
103