ahassoun commited on
Commit
efa07b3
·
1 Parent(s): 05c6a8a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -1,4 +1,4 @@
1
- from TTS.api import TTS
2
  import gradio as gr
3
  from gradio import Dropdown
4
  from scipy.io.wavfile import write
@@ -30,7 +30,7 @@ script_choices = {
30
  "Random": "Grandma, I can’t find your email address. I need to send you something important."
31
  }
32
  }
33
- tts = TTS("tts_models/multilingual/multi-dataset/bark", gpu=True)
34
 
35
 
36
  def split_process(audio, chosen_out_track):
@@ -132,6 +132,7 @@ theme_emojis = {
132
 
133
  css = """
134
  #col-container {max-width: 780px; margin-left: auto; margin-right: auto; background-size: contain; background-repeat: no-repeat;}
 
135
  a {text-decoration-line: underline; font-weight: 600;}
136
  .mic-wrap > button {
137
  width: 100%;
@@ -194,14 +195,12 @@ with gr.Blocks(css=css) as demo:
194
  script_text = gr.Textbox(
195
  label="2 & 3. Read the script below aloud THREE times for the best output:",
196
  lines=5,
197
- readonly=True
198
  )
199
  script_type_dropdown = gr.Dropdown(
200
  label="4. Select the Script Type for Bot Output", choices=["Random", "Negative"])
201
  output_script_text = gr.Textbox(
202
  label="The bot will try to emulate the following script:",
203
  lines=5,
204
- readonly=True
205
  )
206
  theme_dropdown.change(fn=update_script_text, inputs=[
207
  theme_dropdown, script_type_dropdown], outputs=[script_text, output_script_text])
 
1
+ # from TTS.api import TTS
2
  import gradio as gr
3
  from gradio import Dropdown
4
  from scipy.io.wavfile import write
 
30
  "Random": "Grandma, I can’t find your email address. I need to send you something important."
31
  }
32
  }
33
+ # tts = TTS("tts_models/multilingual/multi-dataset/bark", gpu=True)
34
 
35
 
36
  def split_process(audio, chosen_out_track):
 
132
 
133
  css = """
134
  #col-container {max-width: 780px; margin-left: auto; margin-right: auto; background-size: contain; background-repeat: no-repeat;}
135
+ #theme-emoji-bg {position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; opacity: 0.5; background-size: contain; background-repeat: no-repeat; background-position: center;}
136
  a {text-decoration-line: underline; font-weight: 600;}
137
  .mic-wrap > button {
138
  width: 100%;
 
195
  script_text = gr.Textbox(
196
  label="2 & 3. Read the script below aloud THREE times for the best output:",
197
  lines=5,
 
198
  )
199
  script_type_dropdown = gr.Dropdown(
200
  label="4. Select the Script Type for Bot Output", choices=["Random", "Negative"])
201
  output_script_text = gr.Textbox(
202
  label="The bot will try to emulate the following script:",
203
  lines=5,
 
204
  )
205
  theme_dropdown.change(fn=update_script_text, inputs=[
206
  theme_dropdown, script_type_dropdown], outputs=[script_text, output_script_text])