edwko ameerazam08 commited on
Commit
083972e
1 Parent(s): 934f4f9

added Zero-GPU merge and switch in Zero-Spaces (#2)

Browse files

- added Zero-GPU merge and switch in Zero-Spaces (6d797b4f503687675f660c090f66eadbee1dccb1)


Co-authored-by: Ameer Azam <ameerazam08@users.noreply.huggingface.co>

Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -1,6 +1,7 @@
1
  import os
2
  import gradio as gr
3
  import outetts
 
4
  from outetts.version.v1.interface import _DEFAULT_SPEAKERS
5
 
6
  model_config = outetts.HFModelConfig_v1(
@@ -25,7 +26,7 @@ def change_interface_language(language):
25
  return gr.update(choices=speakers, value="male_1"), gr.update(visible=True)
26
  except ValueError as e:
27
  return gr.update(choices=["None"], value="None"), gr.update(visible=False)
28
-
29
  def generate_tts(
30
  text, temperature, repetition_penalty, language,
31
  speaker_selection, reference_audio, reference_text
 
1
  import os
2
  import gradio as gr
3
  import outetts
4
+ import spaces
5
  from outetts.version.v1.interface import _DEFAULT_SPEAKERS
6
 
7
  model_config = outetts.HFModelConfig_v1(
 
26
  return gr.update(choices=speakers, value="male_1"), gr.update(visible=True)
27
  except ValueError as e:
28
  return gr.update(choices=["None"], value="None"), gr.update(visible=False)
29
+ @spaces.GPU()
30
  def generate_tts(
31
  text, temperature, repetition_penalty, language,
32
  speaker_selection, reference_audio, reference_text