Nymbo commited on
Commit
6ead22c
·
1 Parent(s): 6c82621

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -1,6 +1,7 @@
1
  import random
2
  import gradio as gr
3
  import numpy as np
 
4
  from elevenlabs import voices, generate, set_api_key, UnauthenticatedRateLimitError
5
 
6
  def pad_buffer(audio):
@@ -29,7 +30,7 @@ def generate_voice(text, voice_name, api_key):
29
  # Eleven Multilingual V2 is the world's best Text-to-Speech model. Features 38 voices and supports 28 languages. Sign up on [ElevenLabs](https://elevenlabs.io/?from=partnerpierce7156) to get an API Key.
30
  # """
31
 
32
- with gr.Blocks() as block:
33
  #gr.Markdown('[ ![ElevenLabs](https://user-images.githubusercontent.com/12028621/262629275-4f85c9cf-85b6-435e-ab50-5b8c7c4e9dd2.png) ](https://elevenlabs.io)')
34
  #gr.Markdown("# <center> ElevenLabs </center>")
35
  #gr.Markdown(description)
@@ -59,7 +60,8 @@ with gr.Blocks() as block:
59
 
60
  run_button = gr.Button(
61
  text="Generate Voice",
62
- type="button"
 
63
  )
64
 
65
  out_audio = gr.Audio(
 
1
  import random
2
  import gradio as gr
3
  import numpy as np
4
+ import time
5
  from elevenlabs import voices, generate, set_api_key, UnauthenticatedRateLimitError
6
 
7
  def pad_buffer(audio):
 
30
  # Eleven Multilingual V2 is the world's best Text-to-Speech model. Features 38 voices and supports 28 languages. Sign up on [ElevenLabs](https://elevenlabs.io/?from=partnerpierce7156) to get an API Key.
31
  # """
32
 
33
+ with gr.Blocks(theme=gr.themes.Default(primary_hue="pink", secondary_hue="pink")) as block:
34
  #gr.Markdown('[ ![ElevenLabs](https://user-images.githubusercontent.com/12028621/262629275-4f85c9cf-85b6-435e-ab50-5b8c7c4e9dd2.png) ](https://elevenlabs.io)')
35
  #gr.Markdown("# <center> ElevenLabs </center>")
36
  #gr.Markdown(description)
 
60
 
61
  run_button = gr.Button(
62
  text="Generate Voice",
63
+ type="button",
64
+ variant="primary"
65
  )
66
 
67
  out_audio = gr.Audio(