jonathanagustin commited on
Commit
15934ba
1 Parent(s): 2c2c365

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +21 -22
app.py CHANGED
@@ -68,28 +68,27 @@ def main():
68
  with gr.Row():
69
  with gr.Column(scale=1):
70
  gr.Markdown("### Voice Preview")
71
- with gr.Group():
72
- # Function to play the selected voice sample
73
- def play_voice_sample(voice):
74
- return gr.Audio.update(
75
- value=VOICE_PREVIEW_FILES[voice],
76
- label=voice.capitalize(),
77
- )
78
-
79
- # Create buttons for each voice
80
- for voice in VOICE_OPTIONS:
81
- voice_button = gr.Button(
82
- value=f"{voice.capitalize()}",
83
- variant="secondary",
84
- size="sm",
85
- )
86
- voice_button.click(
87
- fn=partial(play_voice_sample, voice=voice),
88
- outputs=preview_audio,
89
- )
90
-
91
- # Place the audio player below the buttons
92
- preview_audio.render()
93
 
94
  with gr.Column(scale=1):
95
  api_key_input = gr.Textbox(
 
68
  with gr.Row():
69
  with gr.Column(scale=1):
70
  gr.Markdown("### Voice Preview")
71
+ # Function to play the selected voice sample
72
+ def play_voice_sample(voice):
73
+ return gr.update(
74
+ value=VOICE_PREVIEW_FILES[voice],
75
+ label=voice.capitalize(),
76
+ )
77
+
78
+ # Create buttons for each voice
79
+ for voice in VOICE_OPTIONS:
80
+ voice_button = gr.Button(
81
+ value=f"{voice.capitalize()}",
82
+ variant="secondary",
83
+ size="sm",
84
+ )
85
+ voice_button.click(
86
+ fn=partial(play_voice_sample, voice=voice),
87
+ outputs=preview_audio,
88
+ )
89
+
90
+ # Place the audio player below the buttons
91
+ preview_audio.render()
 
92
 
93
  with gr.Column(scale=1):
94
  api_key_input = gr.Textbox(