Baseta commited on
Commit
6ae6c19
·
verified ·
1 Parent(s): 45127ea

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -501,6 +501,8 @@ def change_choices():
501
 
502
  def clean():
503
  return {"value": "", "__type__": "update"}
 
 
504
 
505
 
506
  sr_dict = {
@@ -1502,7 +1504,6 @@ with gr.Blocks(theme=gr.themes.Default(primary_hue="red", secondary_hue="rose"),
1502
  get_vc(sorted(names)[0])
1503
  vc_transform0 = gr.Number(label="درجة الصوت: 0 من رجل إلى رجل (أو من امرأة إلى امرأة)؛ 12 من رجل الى أمرأة و-12 من أمرأة إلى رجل '\n' Pitch: 0 from man to man (or woman to woman); 12 from man to woman and -12 from woman to man.", value=0)
1504
 
1505
- clean_button = gr.Button(i18n("Clean"), variant="secondary")
1506
  spk_item = gr.Slider(
1507
  minimum=0,
1508
  maximum=2333,
@@ -1546,6 +1547,7 @@ with gr.Blocks(theme=gr.themes.Default(primary_hue="red", secondary_hue="rose"),
1546
  tfs = gr.Textbox(label="Input your Text", interactive=True, value="This is a test.")
1547
  tts_button = gr.Button(value="Speak")
1548
  tts_button.click(fn=elevenTTS, inputs=[api_box,tfs, elevenid, lang], outputs=[record_button, input_audio0])
 
1549
  with gr.Row():
1550
  with gr.Accordion('Wav2Lip', open=False, visible=False):
1551
  with gr.Row():
 
501
 
502
  def clean():
503
  return {"value": "", "__type__": "update"}
504
+ print("clean_empty_cache")
505
+ del net_g, n_spk, vc, hubert_model, tgt_sr # ,cpt
506
 
507
 
508
  sr_dict = {
 
1504
  get_vc(sorted(names)[0])
1505
  vc_transform0 = gr.Number(label="درجة الصوت: 0 من رجل إلى رجل (أو من امرأة إلى امرأة)؛ 12 من رجل الى أمرأة و-12 من أمرأة إلى رجل '\n' Pitch: 0 from man to man (or woman to woman); 12 from man to woman and -12 from woman to man.", value=0)
1506
 
 
1507
  spk_item = gr.Slider(
1508
  minimum=0,
1509
  maximum=2333,
 
1547
  tfs = gr.Textbox(label="Input your Text", interactive=True, value="This is a test.")
1548
  tts_button = gr.Button(value="Speak")
1549
  tts_button.click(fn=elevenTTS, inputs=[api_box,tfs, elevenid, lang], outputs=[record_button, input_audio0])
1550
+ clean_button = gr.Button(i18n("Clean"), variant="primary")
1551
  with gr.Row():
1552
  with gr.Accordion('Wav2Lip', open=False, visible=False):
1553
  with gr.Row():